home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / inter54b.zip / INTERRUP.F < prev    next >
Text File  |  1997-06-29  |  328KB  |  8,433 lines

  1. Interrupt List, part 6 of 16
  2. Copyright (c) 1989,1990,1991,1992,1993,1994,1995,1996,1997 Ralf Brown
  3. --------D-214400-----------------------------
  4. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  5.     AX = 4400h
  6.     BX = handle
  7. Return: CF clear if successful
  8.         DX = device information word (see #1076)
  9.         AX destroyed
  10.     CF set on error
  11.         AX = error code (01h,05h,06h) (see #1332 at AH=59h/BX=0000h)
  12. Notes:    value in DH corresponds to high byte of device driver's attribute word
  13.       if handle refers to a character device
  14.     Novell NetWare reportedly does not return a drive number in bits 5-0
  15.       for a disk file
  16. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  17.  
  18. Bitfields for device information word:
  19. Bit(s)    Description    (Table 1076)
  20.  character device
  21.   14    device driver can process IOCTL requests (see AX=4402h"DOS 2+")
  22.   13    output until busy supported
  23.   11    driver supports OPEN/CLOSE calls
  24.    7    set (indicates device)
  25.    6    EOF on input
  26.    5    raw (binary) mode
  27.    4    device is special (uses INT 29)
  28.    3    clock device
  29.    2    NUL device
  30.    1    standard output
  31.    0    standard input
  32.  disk file
  33.   15    file is remote (DOS 3.0+)
  34.   14    don't set file date/time on closing (DOS 3.0+)
  35.   11    media not removable
  36.    8    (DOS 4 only) generate INT 24 if no disk space on write or read past
  37.       end of file
  38.    7    clear (indicates file)
  39.    6    file has not been written
  40.   5-0    drive number (0 = A:)
  41. SeeAlso: INT 29
  42. --------D-214401-----------------------------
  43. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  44.     AX = 4401h
  45.     BX = handle (must refer to character device)
  46.     DX = device information word (see #1076)
  47.         (DH must be zero)
  48. Return: CF clear if successful
  49.     CF set on error
  50.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  51. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  52. --------D-214402-----------------------------
  53. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  54.     AX = 4402h
  55.     BX = file handle referencing character device
  56.     CX = number of bytes to read
  57.     DS:DX -> buffer
  58. Return: CF clear if successful
  59.         AX = number of bytes actually read
  60.     CF set on error
  61.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  62. Note:    format of data is driver-specific
  63.       (also see separate entries below for some specific cases)
  64. SeeAlso: AX=4400h,AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  65. --------N-214402-----------------------------
  66. INT 21 - Network Driver Interface Specification (NDIS) 2.0.1 - PROTOCOL MANAGER
  67.     AX = 4402h
  68.     BX = file handle for device "PROTMAN$"
  69.     CX = 000Eh (size of request block)
  70.     DS:DX -> request block (see #1077,#1078,#1079,#1080,#1081,#1085,#1086)
  71. Return: CF clear if successful
  72.         AX = number of bytes actually read
  73.     CF set on error
  74.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  75. SeeAlso: AX=4402h"FTPSOFT"
  76.  
  77. Format of NDIS request block for GetProtocolManagerInfo:
  78. Offset    Size    Description    (Table 1077)
  79.  00h    WORD    01h
  80.  02h    WORD    returned status (see #1087)
  81.  04h    DWORD    returned pointer to structure representing parsed user config
  82.  08h    DWORD    unused
  83.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  84. SeeAlso: #1078,#1079,#1080,#1081,#1082,#1083,#1084,#1085,#1086
  85.  
  86. Format of NDIS request block for RegisterModule:
  87. Offset    Size    Description    (Table 1078)
  88.  00h    WORD    02h
  89.  02h    WORD    returned status (see #1087)
  90.  04h    DWORD    pointer to module's common characteristics table (see #1088)
  91.  08h    DWORD    pointer to list of modules to which the module is to be bound
  92.  0Ch    WORD    unused
  93. SeeAlso: #1077,#1079,#1080,#1081,#1082,#1083,#1084,#1085,#1086
  94.  
  95. Format of NDIS request block for BindAndStart:
  96. Offset    Size    Description    (Table 1079)
  97.  00h    WORD    03h
  98.  02h    WORD    returned status (see #1087)
  99.  04h    DWORD    caller's virtual address in FailingModules structure
  100.  08h    DWORD    unused
  101.  0Ch    WORD    unused
  102. SeeAlso: #1077,#1078,#1080,#1081,#1082,#1083,#1084,#1085,#1086
  103.  
  104. Format of NDIS request block for GetProtocolManagerLinkage:
  105. Offset    Size    Description    (Table 1080)
  106.  00h    WORD    04h
  107.  02h    WORD    returned status (see #1087)
  108.  04h    DWORD    returned dispatch point
  109.  08h    DWORD    unused
  110.  0Ch    WORD    returned protocol manager DS
  111. Note:    the dispatch point may be called as follows instead of using this IOCTL
  112.     STACK: WORD  protocol manager DS
  113.            DWORD pointer to request block
  114.     Return: AX = returned status
  115.         STACK popped
  116. SeeAlso: #1077,#1078,#1079,#1081,#1082,#1083,#1084,#1085,#1086
  117.  
  118. Format of NDIS request block for GetProtocolIniPath:
  119. Offset    Size    Description    (Table 1081)
  120.  00h    WORD    05h
  121.  02h    WORD    returned status (see #1087)
  122.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  123.  08h    DWORD    unused
  124.  0Ch    WORD    buffer length
  125. SeeAlso: #1077,#1078,#1079,#1080,#1082,#1083,#1084,#1085,#1086
  126.  
  127. Format of NDIS request block for RegisterProtocolManagerInfo:
  128. Offset    Size    Description    (Table 1082)
  129.  00h    WORD    06h
  130.  02h    WORD    returned status (see #1087)
  131.  04h    DWORD    pointer to structure containing parsed user config file
  132.  08h    DWORD    unused
  133.  0Ch    WORD    length of structure
  134. SeeAlso: #1077,#1078,#1079,#1080,#1081,#1083,#1084,#1085,#1086
  135.  
  136. Format of NDIS request block for InitAndRegister:
  137. Offset    Size    Description    (Table 1083)
  138.  00h    WORD    07h
  139.  02h    WORD    returned status (see #1087)
  140.  04h    DWORD    unused
  141.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  142.  0Ch    WORD    unused
  143. SeeAlso: #1077,#1078,#1079,#1080,#1081,#1082,#1084,#1085,#1086
  144.  
  145. Format of NDIS request block for UnbindAndStop:
  146. Offset    Size    Description    (Table 1084)
  147.  00h    WORD    08h
  148.  02h    WORD    returned status (see #1087)
  149.  04h    DWORD    failing modules as for BindAndStart
  150.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  151.         if 0000h:0000h, terminate a set of previously dynamically
  152.           bound protocol modules
  153.  0Ch    WORD    unused
  154. SeeAlso: #1077,#1078,#1079,#1080,#1081,#1082,#1083,#1085,#1086
  155.  
  156. Format of NDIS request block for BindStatus:
  157. Offset    Size    Description    (Table 1085)
  158.  00h    WORD    09h
  159.  02h    WORD    returned status (see #1087)
  160.  04h    DWORD    must be 0000h:0000h
  161.         on return, points to root tree
  162.  08h    DWORD    0000h:0000h
  163.  0Ch    WORD    unused under DOS
  164. SeeAlso: #1077,#1078,#1079,#1080,#1081,#1082,#1083,#1084,#1086
  165.  
  166. Format of NDIS request block for RegisterStatus:
  167. Offset    Size    Description    (Table 1086)
  168.  00h    WORD    0Ah
  169.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see #1087)
  170.  04h    DWORD    0000h:0000h
  171.  08h    DWORD    pointer to 16-byte ASCIZ module name
  172.  0Ch    WORD    0000h
  173. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  174. SeeAlso: #1077,#1078,#1079,#1080,#1081,#1082,#1083,#1084,#1085
  175.  
  176. (Table 1087)
  177. Values for NDIS status code:
  178.  0000h    success
  179.  0001h    wait for release--protocol has retained control of the data buffer
  180.  0002h    request queued
  181.  0003h    frame not recognized
  182.  0004h    frame rejected
  183.  0005h    frame should be forwarded
  184.  0006h    out of resource
  185.  0007h    invalid parameter
  186.  0008h    invalid function
  187.  0009h    not supported
  188.  000Ah    hardware error
  189.  000Bh    transmit error
  190.  000Ch    unrecognized destination
  191.  000Dh    buffer too small
  192.  0020h    already started
  193.  0021h    binding incomplete
  194.  0022h    driver not initialized
  195.  0023h    hardware not found
  196.  0024h    hardware failure
  197.  0025h    configuration failure
  198.  0026h    interrupt conflict
  199.  0027h    MAC incompatible
  200.  0028h    initialization failed
  201.  0029h    no binding
  202.  002Ah    network may be disconnected
  203.  002Bh    incompatible OS version
  204.  002Ch    already registered
  205.  002Dh    path not found
  206.  002Eh    insufficient memory
  207.  002Fh    info not found
  208.  00FFh    general failure
  209.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  210.  
  211. Format of NDIS common characteristics table:
  212. Offset    Size    Description    (Table 1088)
  213.  00h    WORD    size of table in bytes
  214.  02h    BYTE    NDIS major version
  215.  03h    BYTE    NDIS minor version
  216.  04h    WORD    reserved
  217.  06h    BYTE    module major version
  218.  07h    BYTE    module minor version
  219.  08h    DWORD    module function flag bits
  220.         bit 0: binding at upper boundary supported
  221.         bit 1: binding at lower boundary supported
  222.         bit 2: dynamically bound
  223.         bits 3-31 reserved, must be 0
  224.  0Ch 16 BYTEs    ASCIZ module name
  225.  1Ch    BYTE    upper boundary protocol level (see #1089)
  226.  1Dh    BYTE    upper boundary interface type
  227.         for MACs: 1 = MAC
  228.         for data links and transports: to be defined
  229.         for session: 1 = NCB
  230.         any level: 0 = private (ISV-defined)
  231.  1Eh    BYTE    lower boundary protocol level (see #1089)
  232.  1Fh    BYTE    lower boundary interface type
  233.         same as offset 1Dh
  234.  20h    WORD    module ID filled in by protocol manager
  235.  22h    WORD    module DS
  236.  24h    DWORD    system request entry point
  237.  28h    DWORD    pointer to service-specific characteristics (see #1091,#1093)
  238.         0000h:0000h if none
  239.  2Ch    DWORD    pointer to service-specific status, or 0000h:0000h if none
  240.           (see #1094)
  241.  30h    DWORD    pointer to upper dispatch table (see #1090)
  242.         0000h:0000h if none
  243.  34h    DWORD    pointer to lower dispatch table (see #1090)
  244.         0000h:0000h if none
  245.  38h  2 DWORDs    reserved, must be 0
  246. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  247.       interpreted as 01h
  248.  
  249. (Table 1089)
  250. Values for NDIS boundary protocol level:
  251.  00h    physical
  252.  01h    Media Access Control
  253.  02h    Data link
  254.  03h    network
  255.  04h    transport
  256.  05h    session
  257.  FFh    not specified
  258.  
  259. Format of NDIS dispatch table:
  260. Offset    Size    Description    (Table 1090)
  261.  00h    DWORD    -> common characteristics table (see #1088)
  262.  04h  4 BYTEs    ???
  263.  08h    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  264.  0Ch    DWORD    -> ??? function (called with 10 bytes of stack arguments)
  265.  10h    DWORD    -> ??? function (called with 16 bytes of stack arguments)
  266.  14h    DWORD    -> ??? function (called with 4 bytes of stack arguments)
  267.  18h    DWORD    -> ??? function (called with 18 bytes of stack arguments)
  268.  1Ch    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  269.  
  270. Format of MAC Service-Specific Characteristics Table:
  271. Offset    Size    Description    (Table 1091)
  272.  00h    WORD    length of table in bytes
  273.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  274.           "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  275.           "HDLC", or "ISDN"
  276.  12h    WORD    length of station addresses in bytes
  277.  14h 16 BYTEs    permanent station address
  278.  24h 16 BYTEs    current station address
  279.  34h    DWORD    current functional adapter address (00000000h if none)
  280.  38h    DWORD    pointer to multicast address list
  281.  3Ch    DWORD    link speed in bits/sec
  282.  40h    DWORD    service flags (see #1092)
  283.  44h    WORD    maximum frame size which may be both sent and received
  284.  46h    DWORD    total transmit buffer capacity in bytes
  285.  4Ah    WORD    transmit buffer allocation block size in bytes
  286.  4Ch    DWORD    total receive buffer capacity in bytes
  287.  50h    WORD    receive buffer allocation block size in bytes
  288.  52h  3 BYTEs    IEEE vendor code
  289.  55h    BYTE    vendor adapter code
  290.  56h    DWORD    pointer to ASCIZ vendor adapter description
  291.  5Ah    WORD    IRQ used by adapter
  292.  5Ch    WORD    transmit queue depth
  293.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  294.  60h  N BYTEs    vendor-specific info
  295. SeeAlso: #1093
  296.  
  297. Bitfields for service flags:
  298. Bit(s)    Description    (Table 1092)
  299.  0    supports broadcast
  300.  1    supports multicast
  301.  2    supports functional/group addressing
  302.  3    supports promiscuous mode
  303.  4    station address software settable
  304.  5    statistics always current
  305.  6    supports InitiateDiagnostics
  306.  7    supports loopback
  307.  8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  308.     indications
  309.  9    supports IBM source routing
  310.  10    supports MAC reset
  311.  11    supports Open/Close adapter
  312.  12    supports interrupt request
  313.  13    supports source routing bridge
  314.  14    supports GDT virtual addresses (OS/2 version)
  315.  15    multiple TransferDatas allowed durign a single indication
  316.  16    MAC normally sets FrameSize = 0 in ReceiveLookahead
  317.  17-31    reserved, must be 0
  318.  
  319. Format of NetBIOS Service-Specific Characteristics Table:
  320. Offset    Size    Description    (Table 1093)
  321.  00h    WORD    length of table in bytes
  322.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  323.  12h    WORD    NetBIOS module code
  324.  14h  N BYTEs    vendor-specific info
  325. SeeAlso: #1091
  326.  
  327. Format of MAC Service-Specific Status Table:
  328. Offset    Size    Description    (Table 1094)
  329.  00h    WORD    length of table in bytes
  330.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  331.         (FFFFFFFFh = never)
  332.  06h    DWORD    MAC status bits (see #1095)
  333.  0Ah    WORD    current packet filter flags (see #1096)
  334.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  335.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  336.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  337.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  338.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  339.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  340.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  341.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  342.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  343.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  344.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  345.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  346.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  347.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  348.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  349.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  350.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  351.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  352.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  353.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  354.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  355.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  356.  64h  N BYTEs    vendor-specific info
  357.  
  358. Bitfields for MAC status bits:
  359. Bit(s)    Description    (Table 1095)
  360.  0-2    operational status
  361.     000 hardware not installed
  362.     001 hardware failed startup diagnostics
  363.     010 hardware configuration problem
  364.     011 hardware fault
  365.     100 operating marginally due to soft faults
  366.     101 reserved
  367.     110 reserved
  368.     111 hardware fully operational
  369.  3    MAC bound
  370.  4    MAC open
  371.  5    diagnostics in progress
  372.  6-31    reserved
  373.  
  374. Bitfields for packet filter flags:
  375. Bit(s)    Description    (Table 1096)
  376.  0    directed/multicast or group/functional
  377.  1    broadcast
  378.  2    promiscuous
  379.  3    all source routing
  380.  4-15    reserved, must be zero
  381. --------D-214402-----------------------------
  382. INT 21 U - MS-DOS 7.0 - CONFIG$ device - GET CONFIGURATION INFORMATION
  383.     AX = 4402h
  384.     BX = file handle for character device "CONFIG$"
  385.     CX = number of bytes to read (at least 5)
  386.     DS:DX -> buffer for ??? data (see #1097)
  387. Return: CF clear if successful
  388.         AX = number of bytes actually read
  389.     CF set on error
  390.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  391. SeeAlso: AX=4403h"CONFIG$"
  392.  
  393. Format of MS-DOS 7.0 CONFIG$ ??? data:
  394. Offset    Size    Description    (Table 1097)
  395.  00h    WORD    ??? (0000h)
  396.  02h    WORD    ??? (0000h or value read from IO.SYS segment 70h)
  397.  04h    BYTE    ??? (value read from IO.SYS segment 70h)
  398. --------I-214402-----------------------------
  399. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  400.     AX = 4402h
  401.     BX = handle for character device "GDMS"
  402.     CX = number of bytes to read (>= 4)
  403.     DS:DX -> buffer (see #1098)
  404. Return: CF set on error
  405.         AX = error code (see #1332 at AH=59h/BX=0000h)
  406.     CF clear if successful
  407.         AX = number of bytes read
  408.  
  409. Format of System 36/38 emulator returned data:
  410. Offset    Size    Description    (Table 1098)
  411.  00h  4 BYTEs    ???
  412.  04h    DWORD    pointer to ???
  413.  08h  4 BYTEs    ???
  414. --------m-214402-----------------------------
  415. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  416.     AX = 4402h
  417.     BX = handle for device "LA$TBYTE"
  418.     CX = 0004h
  419.     DS:DX -> DWORD to hold address of 39-byte table of ???
  420. Return: CF set on error
  421.         AX = error code (see #1332 at AH=59h/BX=0000h)
  422.     CF clear if successful
  423.         AX = number of bytes read
  424. Program: LASTBYTE.SYS is part of the shareware "The Last Byte" memory
  425.       management package by Key Software Products
  426. SeeAlso: AX=4402h"HIGHUMM"
  427. --------m-214402-----------------------------
  428. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  429.     AX = 4402h
  430.     BX = handle for device "KSP$UMM"
  431.     CX = 0004h
  432.     DS:DX -> DWORD to hold entry point (see #1099)
  433. Return: CF set on error
  434.         AX = error code (see #1332 at AH=59h/BX=0000h)
  435.     CF clear if successful
  436.         AX = number of bytes read
  437. Program: HIGHUMM.SYS is part of the shareware "The Last Byte" memory
  438.       management package by Key Software Products
  439. SeeAlso: AX=4402h"LASTBYTE"
  440.  
  441. (Table 1099)
  442. Call HIGHUMM.SYS entry point with:
  443.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  444.         DX = size in paragraphs
  445.         Return: BX = segment number (if successful)
  446.             DX = size of requested block/size of largest block
  447.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  448.         DX = segment number of UMB
  449.     AH = 02h request a bank-switched memory block
  450.         DX = size in paragraphs
  451.         Return: BX = segment number (if successful)
  452.             DX = size of requested block/size of largest block
  453.     AH = 03h release a bank-switched memory block
  454.         DX = segment number
  455.     AH = 04h transfer data to/from high memory
  456.         DS:SI -> source
  457.         ES:DI -> destination
  458.         CX = length in bytes
  459.         Note: enables bank-switched memory, does the copy, then disables
  460.         bank-switched memory
  461.     AH = 05h get a word from bank-switched memory
  462.         ES:DI -> word to read
  463.         Return: DX = word
  464.     AH = 06h put a word to bank-switched memory
  465.         ES:DI -> word to write
  466.         DX = word
  467.     AH = 07h put a byte to bank-switched memory
  468.         ES:DI -> byte to write
  469.         DL = byte
  470.     AH = 08h enable bank-switched memory
  471.         DS:SI -> 6-byte status save area
  472.     AH = 09h disable bank-switched memory
  473.         DS:SI -> 6-byte save area from enable call (AH=08h)
  474.     AH = 0Ah assign name to UMB or high bank-switched block
  475.         DX = segment number
  476.         DS:SI -> 8-byte blank-padded name
  477.     AH = 0Bh locate UMB block by name
  478.         DS:SI -> 8-byte blank-padded name
  479.         Return: BX = segment number (if successful)
  480.             DX = size of block
  481.     AH = 0Ch locate bank-switched block by name
  482.         DS:SI -> 8-byte blank-padded name
  483.         Return: BX = segment number (if successful)
  484.             DX = size of block
  485. Return: AX = status code
  486.         0001h successful
  487.         0000h failed
  488.         BL = error code
  489.             80h not implemented
  490.             B0h insufficient memory, smaller block available
  491.             B1h insufficient memory, no blocks available
  492.             B2h invalid segment number
  493. Note:    only functions 00h and 01h are always available; the remaining
  494.       functions are only enabled if the proper commandline switch is given
  495. --------c-214402-----------------------------
  496. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - GET CACHE STATUS
  497.     AX = 4402h
  498.     BX = file handle for device "SMARTAAR"
  499.     CX = number of bytes to read (min 28h)
  500.     DS:DX -> buffer for status record (see #1100)
  501. Return: CF clear if successful
  502.         AX = number of bytes actually read
  503.     CF set on error
  504.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  505. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  506.       interface, but does not do so correctly, often hanging the system;
  507.       one should use the SmartDrive v4.x or NCache private interfaces
  508.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  509. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  510.  
  511. Format of SMARTDRV status record:
  512. Offset    Size    Description    (Table 1100)
  513.  00h    BYTE    write-through flag (always 01h)
  514.  01h    BYTE    writes should be buffered (always 00h)
  515.  02h    BYTE    cache enabled if 01h
  516.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  517.  04h    WORD    clock ticks between cache flushes (currently unused)
  518.  06h    BYTE    cache contains locked tracks if nonzero
  519.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  520.  08h    BYTE    cache full track writes if nonzero
  521.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  522.  0Ah    DWORD    original INT 13 vector
  523.  0Eh    BYTE    minor version number
  524.  0Fh    BYTE    major version number
  525.  10h    WORD    unused
  526.  12h    WORD    sectors read            \
  527.  14h    WORD    sectors already in cache     > may be scaled rather than
  528.  16h    WORD    sectors already in track buffer /  absolute counts
  529.  18h    BYTE    cache hit rate in percent
  530.  19h    BYTE    track buffer hit rate in percent
  531.  1Ah    WORD    total tracks in cache
  532.  1Ch    WORD    number of tracks in use
  533.  1Eh    WORD    number of locked tracks
  534.  20h    WORD    number of dirty tracks
  535.  22h    WORD    current cache size in 16K pages
  536.  24h    WORD    original (maximum) cache size in 16K pages
  537.  26h    WORD    minimum cache size in 16K pages
  538.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  539. --------d-214402-----------------------------
  540. INT 21 - CD-ROM device driver - IOCTL INPUT
  541.     AX = 4402h
  542.     BX = file handle referencing character device for CD-ROM driver
  543.     CX = number of bytes to read
  544.     DS:DX -> control block (see #1102)
  545. Return: CF clear if successful
  546.         AX = number of bytes actually read
  547.     CF set on error
  548.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  549. Note:    the data returned depends on the first byte of the control block
  550.       (two bytes for function 07h, see #1102); the remainder of the
  551.       control block is filled by the driver
  552. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  553.  
  554. (Table 1101)
  555. Values for CD-ROM data being requested:
  556.  00h    device driver header address
  557.  01h    drive head location
  558.  02h    reserved
  559.  03h    error statistics
  560.  04h    audio channel info
  561.  05h    raw drive bytes (uninterpreted and device-specific)
  562.  06h    device status
  563.  07h    sector size
  564.  08h    volume size
  565.  09h    media change status
  566.  0Ah    audio disk info
  567.  0Bh    audio track info
  568.  0Ch    audio Q-Channel info
  569.  0Dh    audio sub-channel info
  570.  0Eh    UPC code
  571.  0Fh    audio status info
  572.  
  573. Format of CD-ROM control block:
  574. Offset    Size    Description    (Table 1102)
  575.  00h    BYTE    data being requested (see #1101)
  576. ---function 00h---
  577.  01h    DWORD    device driver header address (see also AH=52h,#1298)
  578. ---function 01h---
  579.  01h    BYTE    addressing mode
  580.         00h HSG
  581.         01h Red Book
  582.  02h    DWORD    current location of drive's head
  583.         logical sector number in HSG mode
  584.         frame/second/minute/unused in Red Book mode
  585.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  586. ---function 03h---
  587.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  588. ---function 04h---
  589.  01h    BYTE    input channel (0-3) for output channel 0
  590.  02h    BYTE    volume for output channel 0
  591.  03h    BYTE    input channel (0-3) for output channel 1
  592.  04h    BYTE    volume for output channel 1
  593.  05h    BYTE    input channel (0-3) for output channel 2
  594.  06h    BYTE    volume for output channel 2
  595.  07h    BYTE    input channel (0-3) for output channel 3
  596.  08h    BYTE    volume for output channel 3
  597. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  598.       right prime; a volume of 00h is off
  599.     the default setting is for each input channel to be assigned to the
  600.       same-numbered output channel at full (FFh) volume
  601. ---function 05h---
  602.  01h    BYTE    number of bytes read
  603.  02h 128 BYTEs    buffer for drive bytes
  604. ---function 06h---
  605.  01h    DWORD    device parameters (see #1103)
  606. ---function 07h---
  607.  01h    BYTE    (call) read mode
  608.         00h cooked
  609.         01h raw
  610.  02h    WORD    (return) sector size in bytes
  611. ---function 08h---
  612.  01h    DWORD    volume size in sectors
  613. ---function 09h---
  614.  01h    BYTE    media change status
  615.         00h don't know
  616.         01h media unchanged
  617.         FFh media has been changed
  618. ---function 0Ah---
  619.  01h    BYTE    lowest audio track number
  620.  02h    BYTE    highest audio track number
  621.  03h    DWORD    start address of lead-out track (Red Book format)
  622. --function 0Bh---
  623.  01h    BYTE    track number (set by caller)
  624.  02h    DWORD    starting point of track (Red Book format)
  625.  06h    BYTE    track control info
  626.         bits 15,14,12: track type (notice: bits not contiguous!)
  627.             000 two audio channels, no pre-emphasis
  628.             001 two audio channels with pre-emphasis
  629.             010 data track
  630.             100 four audio channels, no pre-emphasis
  631.             101 four audio channels with pre-emphasis
  632.             other reserved
  633.         bit 13: digital copy permitted
  634. ---function 0Ch---
  635.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  636.  02h    BYTE    track number
  637.  03h    BYTE    point or index
  638.  04h    BYTE    minute    \
  639.  05h    BYTE    second     > running time within track
  640.  06h    BYTE    frame    /
  641.  07h    BYTE    zero
  642.  08h    BYTE    "AMIN" or "PMIN"     \
  643.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  644.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  645. ---function 0Dh---
  646.  01h    DWORD    starting frame address (Red Book format)
  647.  05h    DWORD    transfer address
  648.  09h    DWORD    number of sectors to read
  649. Note:    copies 96 bytes of sub-channel info per sector into buffer
  650. ---function 0Eh---
  651.  01h    BYTE    CONTROL and ADR byte
  652.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  653.  09h    BYTE    zero
  654.  0Ah    BYTE    "AFRAME"
  655. ---function 0Fh---
  656.  ??? documentation not yet available
  657.  01h    WORD    pause status (0000h not paused, 0001h paused)
  658.  03h    DWORD    audio play start address
  659.  07h    DWORD    ??? audio play length or end address
  660.  
  661. Bitfields for CD-ROM device parameters:
  662. Bit(s)    Description    (Table 1103)
  663.  0    door open
  664.  1    door unlocked
  665.  2    supports raw reading in addition to cooked
  666.  3    writable
  667.  4    can play audio/video tracks
  668.  5    supports interleaving
  669.  6    reserved
  670.  7    supports prefetch requests
  671.  8    supports audio channel control
  672.  9    supports Red Book addressing in addition to HSG
  673.  10    audio is playing
  674.  11    no disk in drive
  675.  12    supports R-W subchannels
  676. --------m-214402-----------------------------
  677. INT 21 - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  678.     AX = 4402h
  679.     BX = file handle for device "QEMM386$"
  680.     CX = 0004h
  681.     DS:DX -> DWORD buffer for API entry point
  682. Return: CF clear if successful
  683.         buffer filled (refer to INT 67/AH=3Fh for entry point parameters)
  684.     CF set on error
  685.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  686. Note:    Quarterdeck recently (June 1993) documented this function, but the
  687.       documentation incorrectly states that it is only available for
  688.       QEMM 6+
  689. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  690. --------Q-214402-----------------------------
  691. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  692.     AX = 4402h
  693.     BX = file handle for device "HOOKROM$"
  694.     CX = 0004h
  695.     DS:DX -> DWORD buffer for address of hooked vector table (see #1104)
  696. Return: CF clear if successful
  697.         DS:DX buffer filled
  698.     CF set on error
  699.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  700. SeeAlso: AX=4402h/SF=01h
  701.  
  702. Format of HOOKROM.SYS hooked vector table entry:
  703. Offset    Size    Description    (Table 1104)
  704.  00h  5 BYTEs    FAR jump to actual interrupt handler
  705.         (end of table if first byte is not EAh)
  706.  05h    BYTE    interrupt vector number
  707. --------d-214402-----------------------------
  708. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  709.     AX = 4402h
  710.     BX = file handle for device "SCSIMGR$"
  711.     CX = 0004h or 0005h (refer to notes below)
  712.     DS:DX -> buffer for result (see #1105), set to zeros before call
  713. Return: CF clear if successful
  714.         AX = 0004h or 0005h (refer to notes below)
  715.     CF set on error
  716.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  717. Notes:    the variant of the call requesting five bytes is an UNDOCUMENTED
  718.       extension supported by Adaptec's ASPI2DOS.SYS, ASPI4DOS.SYS, and
  719.       ASPI7DOS.SYS; if made of a host manager which does not support the
  720.       variant, only four bytes will be returned.  If the variant is
  721.       supported, Adaptec's WINASPI.DLL assumes that the host manager is
  722.       an "advanced" one which operates in either real or protected mode
  723.       (and thus does not require a DPMI INT 31/AX=0301h call to be invoked
  724.       from protected mode).     Support of the five-byte variant also appears
  725.       to imply that an advanced ASPI host manager uses no temporary
  726.       storage space except the SRB (see #1107) and the stack, and that it
  727.       is fully reentrant.
  728.     if called with a standard request for four bytes, even Adaptec's
  729.       advanced drivers return only the requested four bytes containing the
  730.       ASPI entry point address
  731.     the function address is called with the address of a SCSI Request
  732.       Block (see #1107) on the stack and the caller must clean up the
  733.       stack
  734. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  735.  
  736. Format of ASPI IOCTL result:
  737. Offset    Size    Description    (Table 1105)
  738.  00h    DWORD    function address
  739.  04h    BYTE    number of SCSI host adapters supported by host manager
  740.  
  741. (Table 1106)
  742. Values for ASPI request number:
  743.  00h    "HA_INQ"    host adapter inquiry / extended host adapter inquiry
  744.  01h    "GET_TYPE"    get device type
  745.  02h    "EXEC_SIO"    execute SCSI I/O
  746.  03h    "ABORT_SRB"    abort SRB
  747.  04h    "RESET_DEV"    reset SCSI device
  748.  05h    "SET_HAPRMS"    set host adapter parameters
  749.  06h    get disk drive information
  750.  
  751. Format of SCSI Request Block (64 bytes):
  752. Offset    Size    Description    (Table 1107)
  753.  00h    BYTE    request number (see #1106)
  754.  01h    BYTE    request status (see #1108)
  755.  02h    BYTE    host adapter ID
  756.  03h    BYTE    request flags (see #1109)
  757.  04h    DWORD    reserved (0)
  758. ---request 00h---
  759.  08h    BYTE    (ret) number of host adapters
  760.  09h    BYTE    (ret) target adapter ID
  761.  0Ah 16 BYTEs    (ret) SCSI manager ID
  762.  1Ah 16 BYTEs    (ret) host adapter ID
  763.  2Ah 16 BYTEs    (ret) host adapter-unique parameters
  764. ---extended request 00h---
  765.  04h  2 BYTEs    (call) extended request signature 55h AAh
  766.         (ret) if extended request supported, reply AAh 55h
  767.  06h    WORD    (call) length of extended buffer at offset 3Ah
  768.         (ret) number of bytes returned in extended buffer
  769.  08h    BYTE    (ret) number of host adapters
  770.  09h    BYTE    (ret) target adapter ID
  771.  0Ah 16 BYTEs    (ret) SCSI manager ID
  772.  1Ah 16 BYTEs    (ret) host adapter ID
  773.  2Ah 16 BYTEs    (ret) host adapter-unique parameters
  774.  3Ah  N BYTEs    extended buffer
  775.         3Ah    WORD    features (see #1110)
  776.         3Ch    WORD    maximum scatter/gather list length
  777.         3Eh    DWORD    maximum SCIS data transfer size (0 = unlimited)
  778. ---request 01h---
  779.  08h    BYTE    target ID
  780.  09h    BYTE    logical unit number
  781.  0Ah    BYTE    (ret) device type (see #1113)
  782. ---request 02h---
  783.  08h    BYTE    target ID
  784.  09h    BYTE    logical unit number
  785.  0Ah    DWORD    data allocation length
  786.         (ret) residual byte length (if supported and requested)
  787.  0Eh    BYTE    sense allocation length
  788.  0Fh    DWORD    data buffer pointer
  789.  13h    DWORD    next request pointer (for linking)
  790.  17h    BYTE    CDB length
  791.  18h    BYTE    (ret) host adapter status (see #1107)
  792.  19h    BYTE    (ret) target status (see #1112)
  793.  1Ah    DWORD    post routine address (see #1119)
  794.  1Eh    WORD    real mode Post DS
  795.  20h    DWORD    SRB pointer
  796.  24h    WORD    reserved
  797.  26h    DWORD    SRB physical address
  798.  2Ah 22 BYTEs    SCSIMGR$ workspace
  799.  40h  N BYTEs    CCB, including sense data (20-24 bytes)
  800. ---request 03h---
  801.  08h    DWORD    address of SRB to abort
  802. ---request 04h---
  803.  08h    BYTE    target ID
  804.  09h    BYTE    logical unit number
  805.  0Ah 14 BYTEs    reserved
  806.  18h    BYTE    (ret) host adapter status (see #1111)
  807.  19h    BYTE    (ret) target status (see #1112)
  808.  1Ah    DWORD    post routine address
  809.  1Eh 34 BYTEs    workspace
  810. ---request 05h---
  811.  08h 16 BYTEs    host adapter-unique parameters
  812. ---request 06h---
  813.  08h    BYTE    target ID
  814.  09h    BYTE    logical unit number
  815.  0Ah    BYTE    disk drive flags (see #1114)
  816.  0Bh    BYTE    INT 13h drive number
  817.  0Ch    BYTE    preferred head number translation
  818.  0Dh    BYTE    preferred sector size translation
  819.  0Eh 10 BYTEs    reserved
  820. SeeAlso: #1115
  821.  
  822. (Table 1108)
  823. Values for ASPI request status:
  824.  00h    not done yet
  825.  01h    completed successfully
  826.  02h    aborted by host
  827.  04h    SCSI I/O error
  828.  80h    invalid
  829.  81h    no adapter
  830.  82h    no device attached
  831.  else    status
  832. SeeAlso: #1107
  833.  
  834. Bitfields for ASPI request flags:
  835. Bit(s)    Description    (Table 1109)
  836.  0    posting enabled
  837.  1    linking enabled
  838.  2    residual byte length reported in Data Allocation Length field
  839.  3    transfer from SCSI target to host
  840.  4    transfer from host to SCSI target
  841.  5    scatter/gather
  842.  7-6    reserved
  843. Note:    no data is transferred if both bits 3 and 4 are set; if neither is
  844.       set, the direction is determined by the SCSI command
  845. SeeAlso: #1107
  846.  
  847. Bitfields for ASPI extended features:
  848. Bit(s)    Description    (Table 1110)
  849.  0    scatter/gather supported
  850.  1    residual byte length reported
  851.  2    Wide SCSI 16 host adapter
  852.  3    Wide SCSI 32 host adapter
  853.  15-4    reserved
  854. SeeAlso: #1107
  855.  
  856. (Table 1111)
  857. Values for host adapter status:
  858.  00h    no error detected
  859.  11h    select timeout
  860.  12h    data overrun
  861.  13h    bus error
  862.  14h    bus failure
  863.  
  864. (Table 1112)
  865. Values for target status:
  866.  00h    no status
  867.  02h    sense data stored in SRB
  868.  08h    target busy
  869.  18h    reservation error
  870.  
  871. (Table 1113)
  872. Values for device type:
  873.  00h    disk drive
  874.  01h    tape drive (streamer)
  875.  02h    printer
  876.  03h    processor
  877.  04h    WORM drive
  878.  05h    CD-ROM drive
  879.  06h    scanner
  880.  07h    optical drive
  881.  08h    autochanger
  882.  09h    communications device
  883.  
  884. (Table 1114)
  885. Values for disk drive flags:
  886.  00h    no INT 13 access
  887.  01h    INT 13 with DOS access
  888.  02h    INT 13 without DOS access
  889.  03h    invalid flags
  890.  
  891. Format of CCB:
  892. Offset    Size    Description    (Table 1115)
  893.  00h    BYTE    command code (see #1116)
  894.  01h    BYTE    flags
  895.         bits 4-0: vary by function
  896.         bits 7-5: logical unit number
  897.  02h    BYTE    "adr_1"
  898.  03h    BYTE    "adr_0"
  899.  04h    BYTE    length
  900.  05h    BYTE    control
  901.     ...
  902.  06h/0Ah 14 BYTEs buffer for sense data (see #1117)
  903. SeeAlso: #1107
  904.  
  905. (Table 1116)
  906. Values for CCB command code:
  907.  00h    test unit ready
  908.  01h    rewind
  909.  03h    request sense data
  910.  05h    get block size limits
  911.  08h    Group 0 read
  912.  0Ah    Group 0 write
  913.  10h    write file marks
  914.  11h    SCSI Space (set position?)
  915.  12h    SCSI Inquire
  916.  15h    set mode information
  917.  16h    reserve SCSI device
  918.  17h    release SCSI device
  919.  19h    erase
  920.  1Ah    request mode information
  921.  1Bh    load/unload media
  922.  1Dh    request target self-check
  923.  24h    set window parameters
  924.  25h    get window parameters
  925.  28h    Group 1 read
  926.  2Ah    Group 1 write
  927.  31h    document feeder control
  928.  34h    get scan data status
  929. ---vendor-specific commands---
  930.  D3h    get document feeder status
  931.  D4h    set document feeder mode
  932.  
  933. Format of sense data:
  934. Offset    Size    Description    (Table 1117)
  935.  00h    BYTE    error code (bit 7 set if valid)
  936.  01h    BYTE    segment number
  937.  02h    BYTE    sense key
  938.         bit 6: EOM
  939.         bit 5: ILI
  940.         bits 0-3: sense key (see #1118)
  941.  03h  4 BYTEs    information bytes
  942.  07h    BYTE    additional sense length (0Ah)
  943.  08h  4 BYTEs    command-specific information
  944.  0Ch    BYTE    additional sense code
  945.  0Dh    BYTE    additional sense code qualifier
  946.  0Eh    BYTE    field replaceable unit code
  947.  0Fh  3 BYTEs    sense key specific bytes
  948.  
  949. (Table 1118)
  950. Values for sense key:
  951.  00h    no sense data
  952.  02h    SCSI unit not ready
  953.  03h    media error
  954.  04h    unrecoverable hardware error
  955.  05h    illegal parameter in CDB
  956.  06h    target has been reset
  957.  0Bh    target aborted command
  958.  
  959. (Table 1119)
  960. Values APSI post function is called with:
  961.     STACK:    DWORD -> SRB (see #1107) which completed
  962.     interrupts disabled
  963. Return: EBP, EBX, ESI, EDI must be preserved
  964.     interrupts disabled
  965. Note:    the post function may issue any APSI function except an abort; it
  966.       should complete as quickly as possible
  967. --------m-214402-----------------------------
  968. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  969.     AX = 4402h
  970.     BX = file handle for device "386MAX$$"
  971.     CX = number of bytes to read
  972.     DS:DX -> BYTE 03h followed by 386MAX state buffer (see #1120)
  973. Return: CF clear if successful
  974.         buffer at DS:DX+1 filled
  975.         AX = number of bytes actually copied
  976.     CF set on error
  977.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  978. Notes:    if the value given in CX is less than the size of the state record
  979.       (5Ah for v6.01, 66h for v7.00), only a partial state record will be
  980.       returned
  981.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  982.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  983.       56h bytes for v5.11.
  984.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  985.       the word at offset 25h in the returned state, load all other
  986.       registers as needed for the desired function, and execute an
  987.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  988.       if it is not otherwise modified by the API function.    For safety,
  989.       in case a function is not supported or 386MAX is not present, SP
  990.       should be saved and restored around the API call.
  991.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  992.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  993.       make some calls incorrectly
  994. SeeAlso: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
  995.  
  996. Format of 386MAX v6.01+ state:
  997. Offset    Size    Description    (Table 1120)
  998.  -1    BYTE    (call) 03h
  999.  00h  6 BYTEs    signature "386MAX"
  1000.  06h  4 BYTEs    version string "N;NN" or "N.NN" (i.e. "6;01" for v6.01)
  1001.         (';' by default; apparently changed to a period when 386MAX
  1002.         has linked high RAM into DOS's memory chain)
  1003.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  1004.  0Ch  2 BYTEs    ???
  1005.  0Eh    WORD    segment of ??? memory block or 0000h
  1006.  10h    WORD    bit flags 1 (see #1121)
  1007.  12h    WORD    starting address of video memory in KB
  1008.  14h  2 BYTEs    ???
  1009.  16h    WORD    total high DOS memory in KB
  1010.  18h  2 BYTEs    ???
  1011.  1Ah    WORD    available shared memory in KB
  1012.  1Ch    WORD    KBytes extended memory used by 386MAX
  1013.  1Eh  2 BYTEs    ???
  1014.  20h    WORD    total extended memory in KB
  1015.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  1016.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  1017.           (see #1134)
  1018.  26h    WORD    ??? (depends on DOS version)
  1019.  28h    WORD    size of ??? in paragraphs
  1020.  2Ah    DWORD    machine type (see #1129)
  1021.  2Eh    DWORD    -> first DOS memory control block
  1022.  32h    WORD    system configuration flags (see #1122)
  1023.  34h    WORD    debugging flags 1 (see #1123)
  1024.  36h    WORD    debugging flags 2 (see #1124)
  1025.  38h  2 BYTEs    ???
  1026.  3Ah    WORD    segment of first MCB in high memory chain
  1027.  3Ch    WORD    feature flags 1 (see #1126)
  1028.  3Eh    WORD    feature flags 2 (see #1127)
  1029.  40h    WORD    feature flags 3 (see #1128)
  1030.  42h    WORD    segment of first 386MAX control block??? (see #1130)
  1031.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  1032.  46h  4 BYTEs    ???
  1033.  4Ah    WORD    number of K at start of address space swapped with fast
  1034.           extended memory (SWAP= parameter)
  1035.  4Ch  2 BYTEs    ???
  1036.  4Eh    WORD    segment address of ???
  1037.  50h    WORD    debugging flags 3 (see #1125)
  1038.  52h    DWORD    old INT 21h
  1039.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  1040. ---386MAX v7.00---
  1041.  5Ah    DWORD    KB of extended memory managed by 386MAX
  1042.  5Eh    DWORD    bytes of extended memory (EXT= parameter)
  1043.  62h  4 BYTEs    ???
  1044.  
  1045. Bitfields for 386MAX bit flags 1:
  1046. Bit(s)    Description    (Table 1121)
  1047.  1    ???
  1048.  2    allow A20 to be enabled/disabled???
  1049.  3    ??? (cleared by calling INT 67 functions or starting MSWindows)
  1050.  4    high RAM present???
  1051.  5    386MAX in AUTO mode
  1052.  6    386MAX enabled
  1053.  7    386MAX is providing EMS services
  1054.  8    ??? (affects API function 08h)
  1055.  9    A20 gate closed (A20 disabled) (see INT 15/AX=2402h)
  1056.  10    Weitek support enabled
  1057.  11    ???
  1058.  12    ROMs not shadowed???
  1059.  13    QPMS has been used
  1060.  14    ???
  1061.  15    ???
  1062.  
  1063. Bitfields for 386MAX system configuration flags:
  1064. Bit(s)    Description    (Table 1122)
  1065.  1    ROM compressed???
  1066.  3    ???
  1067.  5    386MAX loaded into high memory
  1068.  6    Microchannel bus
  1069.  7    Weitek math coprocessor detected
  1070.  9    ??? (also generates INT 01 on ??? and INT 03 on ???)
  1071.  11    PC/XT (thus only single 8259 interrupt controller present, DMA only
  1072.         in 1st megabyte, etc)
  1073.  13    LMLTOP= specified
  1074.  14    enable A20 control???
  1075.  15    ???
  1076.  
  1077. Bitfields for 386MAX debugging flags 1:
  1078. Bit(s)    Description    (Table 1123)
  1079.  0    DEBUG=LED
  1080.  1    DEBUG=X67
  1081.  2    DEBUG=INV
  1082.  3    DEBUG=EMSPTED
  1083.  4    DEBUG=JMP
  1084.  5    DEBUG=CALL
  1085.  6    DEBUG=HLT
  1086.  7    DEBUG=PMR
  1087.  8    DEBUG=CR3
  1088.  9    DEBUG=CAPS or DEBUG=INT
  1089.  10    DEBUG=RC
  1090.  11    DEBUG=ROM
  1091.  12    DEBUG=XM
  1092.  13    DEBUG=SOR
  1093.  14    DEBUG=XR
  1094.  15    DEBUG=EMSERR (generate INT 01 on returning error from EMS call)
  1095.  
  1096. Bitfields for 386MAX debugging flags 2:
  1097. Bit(s)    Description    (Table 1124)
  1098.  0    DEBUG=ROMSWAP
  1099.  1    DEBUG=UNSHADOWROM
  1100.  2    DEBUG=COMPROM
  1101.  3    DEBUG=DPMIPHYS
  1102.  4    DEBUG=ALLROM
  1103.  5    DEBUG=VMS
  1104.  6    DEBUG=XMS (generate INT 01 on XMS calls)
  1105.  7    DEBUG=I06
  1106.  8    DEBUG=VCPI
  1107.  9    DEBUG=XDMA
  1108.  10    DEBUG=X09
  1109.  13    DEBUG=I67 (generate INT 01 on every INT 67 call)
  1110.  14    DEBUG=EVM (generate INT 01 on entering V86 mode)
  1111.  15    DEBUG=EMSSAVE or DEBUG=VDS
  1112.  
  1113. Bitfields for 386MAX debugging flags 3:
  1114. Bit(s)    Description    (Table 1125)
  1115.  10    DEBUG=EPM
  1116.  12    DEBUG=ABIOS
  1117.  13    DEBUG=XMSPTED
  1118.  14    DEBUG=TIME
  1119.  15    DEBUG=SCRUB
  1120.  
  1121. Bitfields for 386MAX feature flags 1:
  1122. Bit(s)    Description    (Table 1126)
  1123.  1    Weitek present
  1124.  2    no DPMI services
  1125.  3    NODMA
  1126.  4    TERSE
  1127.  5    NOROM
  1128.  6    NOPARITY
  1129.  8    NOFLEX (IGNOREFLEXFRAME)
  1130.  11    don't create UMBs
  1131.  12    don't backfill below video memory (NOLOW)
  1132.  13    FRAME= specified
  1133.  14    EXT= specified
  1134.  15    NOEMS, allow prior expanded memory manager to provide EMS
  1135.  
  1136. Bitfields for 386MAX feature flags 2:
  1137. Bit(s)    Description    (Table 1127)
  1138.  0    UNSHIFT specified (FORCEA20 disabled)
  1139.  1    NOXRAM
  1140.  2    NOSCSI specified
  1141.  3    SCREEN specified
  1142.  4    enabled EISADMA
  1143.  5    slow DMA
  1144.  6    RESETKEYB specified
  1145.  7    ???
  1146.  9    TOP384
  1147.  10    ???
  1148.  11    NOWARMBOOT
  1149.  12    USE= specified
  1150.  13    ROM= specified
  1151.  
  1152. Bitfields for 386MAX feature flags 3:
  1153. Bit(s)    Description    (Table 1128)
  1154.  0    Windows3 support enabled
  1155.  1    SHADOWROM
  1156.  2    don't compress ROM (NOCOMPROM)
  1157.  3    ??? (related to PRGREG=)
  1158.  4    ??? (related to PRGREG=)
  1159.  5    SHADOWRAM
  1160.  6    DOS4 specified
  1161.  7    NOLOADHIGH
  1162.  8    NOPULSE
  1163.  11    FORCEA20
  1164.  12    DMA buffer enabled
  1165.  13    NOSCRUB
  1166.  15    NOFRAME
  1167.  
  1168. Bitfields for 386MAX machine type:
  1169. Bit(s)    Description    (Table 1129)
  1170.  12    Amstrad
  1171.  13    Epson
  1172.  14    Zenith Data Systems
  1173.  15    "ASEM"
  1174.  16    NEC
  1175.  17    "HPRS" model codes 69h and 6Ah
  1176.  18    Dell
  1177.  19    "CA"
  1178.  20    ITT (Xtra Business Systems/Alcatel)
  1179.  21    Toshiba 5100
  1180.  22    Olivetti
  1181.  23    Quadram Quad386 (BIOS model FEh, submodel A6h)
  1182.  24    Tandy???
  1183.  25    AST 386
  1184.  26    INBOARD, ??? version
  1185.  27    INBOARD, ??? version
  1186.  28    INBOARD, ??? version
  1187.  29    "HPRS"
  1188.  30    Compaq 386
  1189.  31    JET386
  1190.  
  1191. Format of 386MAX control block:
  1192. Offset    Size    Description    (Table 1130)
  1193.  00h    WORD    segment of next block (FFFFh if last)
  1194.  02h    WORD    segment of previous block (FFFFh if first)
  1195.  04h 12 BYTEs    filename
  1196.  10h    WORD    resident size in paragraphs
  1197.  12h    WORD    environment size???
  1198.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  1199.  16h  2 BYTEs    ???
  1200.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  1201.  1Ch    DWORD    SIZE=-1 ???
  1202.  20h    DWORD    SIZE= ???
  1203.  24h    BYTE    PRGREG= if specified, else FFh
  1204.  25h    BYTE    ENVREG= if specified, else FFh
  1205.  26h    BYTE    FlexFrame (00h not present, 01h present)
  1206.  27h  3 BYTEs    ???
  1207.  2Ah    BYTE    GROUP= or 00h if not present
  1208.  2Bh    BYTE    ???
  1209.  2Ch    WORD    PSP
  1210.  
  1211. Format of 386MAX high memory info record:
  1212. Offset    Size    Description    (Table 1131)
  1213.  00h    WORD    segment address of memory region
  1214.  02h    WORD    size of memory region in paragraphs
  1215.  04h    BYTE    type or flags???
  1216.         00h if locked out
  1217.         02h if EMS page frame
  1218.         04h if high RAM
  1219.         42h if ROM
  1220.  05h    BYTE    ???
  1221.  
  1222. Format of 386MAX ROM shadowing record:
  1223. Offset    Size    Description    (Table 1132)
  1224.  00h    WORD    logical start segment of ROM??? (may be used by BlueMAX when it
  1225.           squeezes together the ROMs to make room)
  1226.  02h    WORD    physical start segment of ROM
  1227.  04h  2 BYTEs    ???
  1228.  06h    WORD    size of shadowed ROM in paragraphs
  1229.  08h  2 BYTEs    ???
  1230.  0Ah    WORD    flags
  1231.         bit 15: shadowing enabled for this ROM???
  1232.         bit 14: ???
  1233.         bit 13: ???
  1234.         bit 12: ???
  1235.         bit 10: ???
  1236.  
  1237. (Table 1133)
  1238. Values for 386MAX memory type:
  1239.  00h    unused by EMS
  1240.  01h    DOS
  1241.  04h    page frame overlapping ROM???
  1242.  80h    high memory
  1243.  84h    page frame???
  1244.  87h    video ROM???
  1245. Note:    the type may be 00h (unused) if the 16K page is split among different
  1246.       uses (such as ROM and high RAM)
  1247.  
  1248. (Table 1134)
  1249. Call 386MAX API (via OUT DX,AL) with:
  1250.     STACK: WORD value for DX
  1251.     AH = 00h unused
  1252.         Return: AH = 84h (unsupported function)
  1253.     AH = 01h get high memory information
  1254.         ES:DI -> buffer for array of high memory info records
  1255.             (see #1131)
  1256.         Return: CX = number of records placed in buffer
  1257.     AH = 02h get shadowed ROM info
  1258.         ES:DI -> buffer for array of ROM shadowing records (see #1132)
  1259.         Return: CX = number of records placed in buffer
  1260.     AH = 03h get 386MAX state
  1261.         ES:DI -> 90-byte buffer for state (see #1120)
  1262.         Return: AH = 00h (successful)
  1263.             buffer filled
  1264.     AH = 04h get memory types???
  1265.         ES:DI -> buffer for memory type info (array of bytes, one per
  1266.             16K page) (see #1133)
  1267.         Return:    CX = number of bytes placed in buffer
  1268.     AH = 05h get page table entries
  1269.         AL = A20 control (00h enable A20 first, 01h leave unchanged)
  1270.         CX = buffer size in bytes (0000h = enough for all memory from
  1271.             given start to end of memory managed by 386MAX)
  1272.         SI = first K to report (rounded down to 4K page)
  1273.         ES:DI -> buffer for returned page table entries
  1274.         Return: CX = number of bytes returned (four per 4K page)
  1275.             ES:DI buffer filled
  1276.     AH = 06h get memory speed info
  1277.         ES:DI -> buffer for memory speed records (see #1135)
  1278.         Return: AH = 00h (successful)
  1279.             CX = number of bytes placed in buffer
  1280.         Note:    this function can take over a second to execute
  1281.     AH = 07h map/unmap multiple handle pages
  1282.         DX = EMS handle (on stack)
  1283.         STACK: DWORD -> EMS mapping record
  1284.         Return:    AH = status (00h,80h,83h,8Ah,8Bh)
  1285.         Format of EMS mapping record:
  1286.         Offset    Size    Description
  1287.          00h    WORD    function
  1288.                 0000h use physical page numbers
  1289.                 0001h use segment addresses
  1290.          02h    WORD    EMS handle
  1291.          04h    WORD    number of mapping entries following
  1292.          06h 2N WORDs    logical page number and physical page/segment
  1293.                 logical page FFFFh means unmap physical page
  1294.         SeeAlso: INT 67/AH=50h
  1295.     AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
  1296.         AL = ??? (00h or nonzero)
  1297.         Return: AH = status (00h OK, A4h not possible at this time)
  1298.         Note:    if AL=00h, this function always returns success
  1299.     AH = 09h toggle Bit Flags 1 flags
  1300.         BX = bitmask of bit flags 1's flags to toggle (see #1121)
  1301.         Return: AH = 00h (successful)
  1302.         Note:    enables A20 first
  1303.     AH = 0Ah toggle Debugging Flags 1 flags
  1304.         BX = bitmask of Debugging Flags 1's bits to toggle (see #1123)
  1305.         Return: AH = 00h (successful)
  1306.         Notes:    enables A20 first
  1307.             does ??? if bit 3 on after specified bits are toggled
  1308.     AH = 0Bh toggle Debugging Flags 2 flags
  1309.         BX = bitmask of Debugging Flags 2's bits to toggle (see #1124)
  1310.         Return: AH = 00h (successful)
  1311.         Note:    enables A20 first
  1312.     AH = 0Ch toggle feature flags 3
  1313.         BX = bitmask of feature flags 3's bits to toggle (see #1128)
  1314.         Return: AH = 00h (successful)
  1315.         Note:    enables A20 first
  1316.     AH = 0Dh specify 386MAX high-memory location
  1317.         BX = segment address of high-memory real-mode portion of 386MAX
  1318.         CX = current segment of real-mode stub???
  1319.         Return: AH = status (00h successful)
  1320.             ???
  1321.     AH = 0Eh CRT controller register virtualization
  1322.         AL = subfunction
  1323.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  1324.             01h trap accesses to CRTC I/O ports
  1325.     AH = 0Fh reboot system
  1326.         Return: never
  1327.     AH = 10h unused
  1328.         Return: AH = 84h (unsupported function)
  1329.     AH = 11h get high memory information
  1330.         ES:DI -> 96-byte buffer for high memory info
  1331.         Return: AH = 00h (successful)
  1332.             ES:DI buffer filled
  1333.         Notes:    each byte in buffer contains bit flags for a 4K page in
  1334.               the A000h-FFFFh region
  1335.                 bit 0: page is writeable
  1336.                 bit 1: physical address same as linear address
  1337.                 bit 2: EMS page frame
  1338.                 bit 6: page is part of the QPMS window
  1339.             this function can take over a second to execute,
  1340.               because it does a 128K read for each page in an
  1341.               attempt to flush any RAM cache the system may have
  1342.     AH = 12h shadow RAM mapping
  1343.         AL = subfunction
  1344.             00h unshadow ROMs (except page FFh if NOWARMBOOT set)
  1345.             01h map shadow RAM into ROM regions???
  1346.         Return: AH = 00h (successful) if AL=00h or 01h
  1347.             AH = 8Fh otherwise
  1348.     AH = 13h shadow RAM page protection
  1349.         AL = subfunction
  1350.             00h set all shadowed ROM 4K pages to read-only
  1351.             01h set all shadowed ROM 4K pages to read-write
  1352.         Return: AH = 00h (successful) if AL=00h or 01h
  1353.             AH = 8Fh otherwise
  1354.     AH = 14h get Programmable Option Select info???
  1355.         ES:DI -> 54-byte buffer for POS data???
  1356.         Return: AH = 00h if successful
  1357.             AH = A4h on error
  1358.         Note:    the buffer consists of nine 6-byte fields; the first
  1359.               eight for slots 1-8, the last for the system board
  1360.     AH = 15h ???
  1361.         ???
  1362.         Return: ???
  1363.     AH = 16h get 386MAX memory usage screen
  1364.         ES:DI -> buffer for memory info display
  1365.         CX = size of buffer in bytes
  1366.         Return:    ES:DI buffer filled with '$'-terminated string (if
  1367.                 large enough to hold entire usage screen)
  1368.         Note:    the screen is 0303h bytes in v7.00
  1369.     AH = 17h Windows 3 startup/termination
  1370.         AL = subfunction
  1371.             00h Windows3 initializing
  1372.             DX (on stack) = Windows startup flags
  1373.             DI = Windows version number (major in upper byte)
  1374.             ES:BX = 0000h:0000h
  1375.             DS:SI = 0000h:0000h
  1376.             Return: CX = 0000h if OK for Windows to load
  1377.                    <> 0 if Windows should not load
  1378.                 ES:BX -> startup info structure
  1379.                 DS:SI -> Virtual86 mode enable/disable callback
  1380.             01h Windows3 terminating
  1381.             ES:BX -> ???
  1382.             DX (on stack) = Windows exit flags
  1383.             Return: ???
  1384.     AH = 18h QPMS (Qualitas Protected Memory Services)
  1385.         AL = subfunction
  1386.             00h get QPMS configuration
  1387.             Return: BX = starting segment of QPMS memory window
  1388.                 CX = number of 4K pages reserved for QPMS???
  1389.                 DX = number of 4K pages in QPMS window???
  1390.             01h map QPMS memory page???
  1391.             BX = 4K page number within memory reserved for QPMS???
  1392.             CL = 4K page number within QPMS memory window???
  1393.             02h mark all QPMS memory read-only
  1394.             03h mark all QPMS memory read-write
  1395.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  1396.     AH = 19h get linear address for physical address
  1397.         EDX = physical address (low word on stack)
  1398.         Return: AH = status
  1399.                 00h successful
  1400.                 EDX = linear address at which physical address
  1401.                     may be accessed
  1402.                 8Bh physical address currently not addressable
  1403.         Note:    enables A20 first
  1404.     AH = 1Ah set page table entry
  1405.         EDX = new page table entry (low word on stack)
  1406.         ESI = linear address of page to map (bits 0-11 clear)
  1407.         Return: AH = status (00h,8Bh)
  1408.         Note:    enables A20 first
  1409.     AH = 1Bh get ???
  1410.         Return: AH = status
  1411.             BX = ???
  1412.             CX = number of ???
  1413.             EDX = physical address of ???
  1414.     AH = 1Ch get original interrupt vector
  1415.         AL = interrupt vector (00h-7Fh)
  1416.         Return: AH = 00h (successful)
  1417.             EDX = original vector before 386MAX loaded (segment in
  1418.                 high word, offset in low word)
  1419.         Note:    no range checking is performed; requests for INTs 80h-
  1420.               FFh will return random values
  1421.     AH = 1Dh display string???
  1422.         SI = ???
  1423.         Return: AH = 00h (successful)
  1424.             ???
  1425.         Note:    this function appears to be broken in v7.00
  1426.     AH = 1Eh get memory info
  1427.         ES:DI -> memory info (see #1136)
  1428.         Return: ???
  1429.     AH = 1Fh get DPMI host information
  1430.         Return: AX = 0000h if successful
  1431.             BX = DPMI flags (see #2784 at INT 31/AX=0400h)
  1432.             CL = CPU type (02h = 80286, 03h = 80386, etc.)
  1433.             DX = DPMI ver supported (DH=major, DL=2-digit minor)
  1434.             SI = ???
  1435.             ES???:DI -> ???
  1436.         Note:    NOP if NODPMI switch specified
  1437.     AH = 20h (v7.00) get ???
  1438.         AL = index of ???
  1439.         Return: EDX = ??? for specified ???
  1440.     AH = 21h (v7.00) STACKS support
  1441.         AL = 00h get STACKS parameters
  1442.         Return: BX = ??? (0060h for v7.00)
  1443.             CX = number of stacks for hardware interrupts
  1444.             DX = size of each stack in bytes
  1445.             SI = ??? (low and high bytes are separate values)
  1446.             DI = ??? (low and high bytes are separate values)
  1447.                 low byte = logical page number set by subfn 02h
  1448.             ES = ???
  1449.         AL = 01h set ??? "EMM2_DSTKS"
  1450.         EBX = ???
  1451.         ECX = ???
  1452.         AL = 02h set ???
  1453.         BL = logical page number for ??? (00h-03h)
  1454.         Return: AH = status (00h,8Ah)
  1455.     AH = 22h (v7.00) call ??? for every load module
  1456.         AL = which function to call
  1457.         00h call ???
  1458.         else call ????
  1459.         Return: AH = 00h
  1460.         Note: if AL=00h, calls the protected-mode function pointed at by
  1461.         the DWORD at offset 22h from the start of each module installed
  1462.         by a LOAD= directive; if AL<>00h, it calls the function
  1463.         pointed at by the DWORD at offset 28h of the load module
  1464.     AH = 23h (v7.00) ???
  1465.         AL = 00h set ???
  1466.         BL = ???
  1467.         Return:    AH = 00h or unchanged (depending on ???)
  1468.         AL = 01h set ???
  1469.         BL = ???
  1470.         BH = ???
  1471.         CX = ???
  1472.         DX = ??? (on top of stack)
  1473.         Return: AH = status (00h if successful, 8Fh once table full)
  1474.         Note:    this call adds one entry to an internal table on each
  1475.               call, until the table is full
  1476.         AL = 02h get ???
  1477.         CX = size of buffer
  1478.         ES:DI -> buffer for ??? (60 bytes total data)
  1479.         Return: CX = number of bytes actually returned
  1480.         Note:    returns the array storing the values set with AX=2301h
  1481.         Format of one entry in array:
  1482.         Offset    Size    Description
  1483.          00h    BYTE    ??? (BL from subfn 01h)
  1484.          01h    WORD    ??? (CX from subfn 01h)
  1485.          03h    BYTE    ??? (BH from subfn 01h)
  1486.          04h    WORD    ??? (DX from subfn 01h)
  1487.         AL = 03h set ??? name/path
  1488.         ES:DI -> buffer containing ASCIZ ???
  1489.         AL = 04h get ???
  1490.         ES:DI -> buffer for ASCIZ ???
  1491.         Note: the ASCIZ string for subfunctions 03h and 04h does not appear
  1492.         to be used by 386MAX, and may serve merely for communication
  1493.         between two other Qualitas programs
  1494.     AH = 24h (v7.00) high memory control
  1495.         AL = 00h get high memory state
  1496.         Return: BX = current state
  1497.                 00h high memory removed from DOS memory chain
  1498.                 01h high memory included in DOS memory chain
  1499.         AL = 01h set high memory state
  1500.         BX = new state
  1501.             00h high memory removed from DOS memory chain
  1502.             01h high memory included in DOS memory chain
  1503.             else
  1504.             Return: ??? (error, but return varies according to ???)
  1505.     AH = 25h (v7.00) remove high RAM from DOS memory chain
  1506.     AH = 26h (v7.00) ???
  1507.         BX = ???
  1508.         CX = ???
  1509.         SI = ???
  1510.         DI = ???
  1511.         Return: AH = status
  1512.             BX = ???
  1513.             CX = ???
  1514.     AH = 27h (v7.00) ???
  1515.         AL = 00h get ???
  1516.         Return: BX = number of paragraphs for ???
  1517.         AL = 01h ???
  1518.         BX = ???
  1519.         ES??? = ???
  1520.         AL = 02h ???
  1521.         ???
  1522.         AL = 03h ???
  1523.         CX = ???
  1524.         DX = ???
  1525.         ES??? = ???
  1526.         Return: ???
  1527.     AH = 28h (v7.00) get ???
  1528.         Return: AH = status (00h,8Fh) (see #3280 at INT 67/AH=40h)
  1529.             if AH=00h,
  1530.                 CX = ???
  1531.                 DX = ???
  1532.     AH = 29h (v7.00) get ???
  1533.         Return: AX = ???
  1534.     AH = 40h-5Dh EMS services (see INT 67/AH=40h, etc.)
  1535.     AH = DEh VCPI services (see INT 67/AX=DE00h, etc.)
  1536. Return: AH = status (as for EMS INT 67 calls)
  1537.         00h successful
  1538.         80h internal error
  1539.         81h hardware malfunction
  1540.         83h invalid handle
  1541.         84h    undefined function
  1542.         8Ah invalid logical page nuber
  1543.         8Bh illegal physical page number
  1544.         8Fh undefined subfunction
  1545.         A4h access denied
  1546.         etc.
  1547.     STACK popped (value placed in DX if no specific return value for DX)
  1548.  
  1549. Format of 386MAX memory speed record:
  1550. Offset    Size    Description    (Table 1135)
  1551.  00h    DWORD    page table entry for 4K page
  1552.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  1553.           entire 4K page
  1554.  
  1555. Format of 386MAX memory info [array]:
  1556. Offset    Size    Description    (Table 1136)
  1557.  00h    DWORD    linear start address
  1558.  04h    DWORD    size in bytes
  1559.  08h    WORD    XMS handle (if next byte = 04h)
  1560.         ??? (if next byte = 05h)
  1561.         ??? (if next byte = 06h)
  1562.         ??? (if next byte = 13h)
  1563.         ??? (if next byte = 14h)
  1564.         ??? (if next byte = 15h)
  1565.         ??? (if next byte = 23h)
  1566.         ??? (if next byte = 24h)
  1567.         ??? (if next byte = 26h)
  1568.         else unused
  1569.  0Ah    BYTE    type
  1570.         00h = ???, 01h = VDISK,
  1571.         02h = INT 15h extended memory, 03h = ??? extended,
  1572.         04h = XMS handle's memory, 05h = ???, 06h = ???, 07h = ???,
  1573.         08h = ???, 09h = ???, 0Ah = ???, 0Bh = ???,
  1574.         11h = ???, 12h = ???, 14h = ???, 15h = ???,
  1575.         19h = ???, 1Ah = ???, 1Bh = ???,
  1576.         1Ch = ???, 1Dh = ???, 1Eh = ???, 1Fh = ???,
  1577.         20h = ???, 21h = ???, 23h = ???, 24h = ???,
  1578.         26h = ???
  1579.  0Bh    BYTE    ??? (00h for types 00h-03h, 07h-0Bh, 19h-21h;
  1580.              80h for types 04h/13h-15h/23h-26h;
  1581.             ??? for type 05h)
  1582. --------V-214402-----------------------------
  1583. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  1584.     AX = 4402h
  1585.     BX = file handle for device "PGS1600$"
  1586.     CX = 0018h (size of buffer)
  1587.     DS:DX -> configuration buffer (see #1137)
  1588. Return: CF clear if successful
  1589.         buffer filled
  1590.         AX = number of bytes actually copied
  1591.     CF set on error
  1592.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1593. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  1594.       display adapter, which provides a 1600x1200 monochrome display as
  1595.       well as one of two emulations, MDA or CGA.
  1596. SeeAlso: AX=4403h"PGS1600"
  1597.  
  1598. Format of PGS1600.DEV configuration information:
  1599. Offset    Size    Description    (Table 1137)
  1600.  00h    WORD    version (high byte = major, low byte = minor)
  1601.  02h    WORD    board initialisation mode
  1602.  04h    WORD    board I/O address
  1603.         03D0h CGA emulation
  1604.         03B0h MDA emulation
  1605.         0390h no emulation
  1606.         0350h no emulation, alternate
  1607.  06h    WORD    emulation buffer segment
  1608.         B800h    CGA emulation
  1609.         B000h    MDA emulation
  1610.         0000h    no emulation
  1611.  08h    WORD    PG1600 graphics buffer segment
  1612.  0Ah    WORD    number of bytes between consecutive graphic rows
  1613.  0Ch    WORD    horizontal pixel size
  1614.  0Eh    WORD    vertical pixel size
  1615.  10h    WORD    horizontal dots per inch
  1616.  12h    WORD    vertical dots per inch
  1617.  14h    WORD    graphics buffer bits per pixel
  1618.  16h    WORD    monitor bits per pixel
  1619. --------N-214402-----------------------------
  1620. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  1621.     AX = 4402h
  1622.     BX = file handle referencing device "$IPCUST"
  1623.     CX, DS:DX ignored
  1624. Return: CF clear if successful
  1625.         AX destroyed
  1626.     CF set on error
  1627.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1628. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  1629.       version 2.05.     If less than the entire data is read or written,
  1630.       the next read/write continues where the previous one ended; this
  1631.       call and AX=4403h both reset the location at which the next
  1632.       operation starts to zero
  1633.     v2.1+ uses a new configuration method, but allows the installation
  1634.       of IPCUST.SYS for backward compatibility with other software which
  1635.       must read the PC/TCP configuration
  1636. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  1637. --------N-214402-----------------------------
  1638. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  1639.     AX = 4402h
  1640.     BX = file handle for device "NET$HLP$"
  1641.     CX = 0008h
  1642.     DS:DX -> buffer for entry point record (see #1138)
  1643. Return: CF clear if successful
  1644.         AX = number of bytes actually read
  1645.     CF set on error
  1646.         AX = error code
  1647. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  1648.       permits communication with PCs running Windows for Workgroups or
  1649.       LAN Manager
  1650. SeeAlso: AH=3Fh"WORKGRP.SYS"
  1651.  
  1652. Format of WORKGRP.SYS entry point record:
  1653. Offset    Size    Description    (Table 1138)
  1654.  00h    WORD    3633h  \ signature???
  1655.  02h    WORD    EF6Fh  /
  1656.  04h    DWORD    address of entry point (see #1139)
  1657. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  1658.       IOCTL rather than READ to get the entry point record
  1659.  
  1660. (Table 1139)
  1661. Call WORKGRP entry point with:
  1662.     STACK:    WORD    function number (0000h-0009h)
  1663. Return: STACK unchanged
  1664. SeeAlso: #1140,#1141,#1142,#1143,#1144,#1145,#1146,#1147
  1665.  
  1666. (Table 1140)
  1667. Call WORKGRP function 00h with:
  1668.     STACK:    WORD    0000h (function "get ???")
  1669. Return: DX:AX -> data table
  1670.  
  1671. (Table 1141)
  1672. Call WORKGRP function 01h with:
  1673.     STACK:    WORD    0001h (function "hook ???")
  1674. Return: STACK:    DWORD    pointer to ???
  1675.         WORD    0001h (function number)
  1676.  
  1677. (Table 1142)
  1678. Call WORKGRP function 02h with:
  1679.     STACK:    WORD    0002h (function "unhook ???")
  1680.     ???
  1681. Return: ???
  1682.  
  1683. (Table 1143)
  1684. Call WORKGRP function 03h with:
  1685.     STACK:    WORD    0003h (function "reenable printer port")
  1686.         WORD    LPT port number
  1687. Return: ???
  1688.  
  1689. (Table 1144)
  1690. Call WORKGRP function 04h with:
  1691.     STACK:    WORD    0004h (function "disable printer port")
  1692.         WORD    LPT port number
  1693. Return: ???
  1694.  
  1695. (Table 1145)
  1696. Call WORKGRP function 05h with:
  1697.     STACK:    WORD    0005h (function "???")
  1698.         ???
  1699. Return: ???
  1700.  
  1701. (Table 1146)
  1702. Call WORKGRP function 06h with:
  1703.     STACK:    WORD    0006h (function "???")
  1704. Return: STACK unchanged
  1705.     AX = 0000h
  1706.     DX = 0000h
  1707.  
  1708. (Table 1147)
  1709. Call WORKGRP functions 07h-09h with:
  1710.     STACK:    WORD    0007h-0009h (NOP functions)
  1711. Return: STACK unchanged
  1712.     AX = 0001h
  1713.     DX = 0000h
  1714. --------N-214402-----------------------------
  1715. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  1716.     AX = 4402h
  1717.     BX = file handle referencing device "10BEUI$"
  1718.     DS:DX -> parameter record (see #1148)
  1719.     CX ignored
  1720. Return: CF clear if successful
  1721.         AX destroyed
  1722.     CF set on error
  1723.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1724. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  1725.  
  1726. Format of 10NET 10BEUI.DOS parameter record:
  1727. Offset    Size    Description    (Table 1148)
  1728.  00h    WORD    000Ah (function number???)
  1729.  02h    WORD    ???
  1730.  04h    DWORD    pointer to buffer for ???
  1731.  08h  4 BYTEs    ???
  1732.  0Ch    WORD    transfer size
  1733. --------N-214402-----------------------------
  1734. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  1735.     AX = 4402h
  1736.     BX = file handle referencing device "MEMMGR0$"
  1737.     DS:DX -> 6-byte buffer for interface info (see #1149)
  1738.     CX ignored
  1739. Return: CF clear if successful
  1740.         AX destroyed
  1741.     CF set on error
  1742.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1743. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  1744.  
  1745. Format of 10NET 10MEMMGR.SYS interface info:
  1746. Offset    Size    Description    (Table 1149)
  1747.  00h    DWORD    address of entry point (see #1150)
  1748.  04h    WORD    version (0500h for v5.00)
  1749.  
  1750. (Table 1150)
  1751. Call 10NET 10MEMMGR.SYS entry point with:
  1752.     AL = 01h ???
  1753.         BX = ???
  1754.         Return: CF clear if successful
  1755.             CF set on error
  1756.             AX = error code
  1757.     AL = 02h ???
  1758.         ???
  1759.     AL = 03h ???
  1760.         ???
  1761.     AL = 04h set/restore memory allocation strategy
  1762.         BX = subfunction
  1763.         0000h set strategy
  1764.         0001h restore strategy
  1765.         Return: CF clear if successful
  1766.             CF set on error (if function disabled)
  1767.             various registers destroyed
  1768.     AL = other
  1769.         Return: CF set
  1770.             AX = 0000h
  1771.             BL = 01h
  1772. --------V-214402-----------------------------
  1773. INT 21 - Compaq AG1024.SYS - RGDI - GET DRIVER LOCATION
  1774.     AX = 4402h
  1775.     BX = file handle for device "$$$$RGDI"
  1776.     CX = 0006h (size of returned data)
  1777.     DS:DX -> location record (see #1151)
  1778. Return: CF clear if successful
  1779.         buffer filled
  1780.     CF set on error
  1781.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1782. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  1783. SeeAlso: AX=4403h"RGDI"
  1784.  
  1785. Format of Compaq AG1024.SYS location record:
  1786. Offset    Size    Description    (Table 1151)
  1787.  00h    WORD    signature 55AAh
  1788.  02h    WORD    segment of ???
  1789.  04h    WORD    segment of device driver's code
  1790. --------N-214402-----------------------------
  1791. INT 21 - FTPSOFT.DOS v3.1 - GET ???
  1792.     AX = 4402h
  1793.     BX = file handle for device "FTPSOFT$"
  1794.     CX = size of buffer
  1795.     DS:DX -> buffer for data (see #1152)
  1796. Return: CF clear if successful
  1797.         buffer filled
  1798.     CF set on error
  1799.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1800. Program: FTPSOFT.DOS is a device driver for Protocol Manager support from
  1801.        FTP Software, Inc.
  1802. SeeAlso: AH=3Fh"PC/TCP",AX=4402h"NDIS"
  1803.  
  1804. Format of FTPSOFT.DOS data:
  1805. Offset    Size    Description    (Table 1152)
  1806.  00h    WORD    (call) BA98h (if different, no data returned)
  1807.  02h    DWORD    -> NDIS common characteristics table
  1808.           (see #1088 at AX=4402h"NDIS")
  1809.  06h    DWORD    (call) -> new dispatch table (see #1090 at AX=4402h"NDIS")
  1810.  0Ah    DWORD    -> 28-byte buffer for ??? data
  1811.  0Eh    DWORD    ???
  1812.  12h    DWORD    -> FAR function to reset dispatch jump table to defaults
  1813.  16h    BYTE    ???
  1814. Note:    the addresses in the new dispatch table are copied into an internal
  1815.       jump table which may be reset by calling the function pointed at by
  1816.       offset 12h
  1817. --------n-214402-----------------------------
  1818. INT 21 U - PenDOS PENDEV.SYS - GET ENTRY POINTS
  1819.     AX = 4402h
  1820.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  1821.     CX = size of buffer (4 for $$PENDOS and a 4,8,12, or 16 for $$PD_REG)
  1822.     DS:DX -> buffer for entry point record (see #1153)
  1823. Return: CF clear if successful
  1824.         buffer filled
  1825.     CF set on error
  1826.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1827. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  1828.       which provides pen capability to keyboard-based programs, is bundled
  1829.       with IBM DOS 6.1
  1830. SeeAlso: AX=4403h"PENDEV.SYS"
  1831.  
  1832. Format of PENDEV.SYS entry point record:
  1833. Offset    Size    Description    (Table 1153)
  1834.  00h    DWORD    -> array of jumps
  1835.  04h    WORD    offset of function to retrieve entry point (see #1154)
  1836.  06h  2 BYTEs    signature "Pe"
  1837.  08h    WORD    offset of function to set entry point (see #1155)
  1838.  0Ah  2 BYTEs    signature "nD"
  1839.  0Ch    WORD    offset of function to clear entry point (see #1156)
  1840.  0Eh    WORD    signature "OS"
  1841.  
  1842. (Table 1154)
  1843. Call PENDEV.SYS function to retrieve entry point with:
  1844.     AX = index of entry point (0-9)
  1845. Return: CF clear if successful
  1846.         DX:AX -> desired entry point
  1847.     CF set on error (AX out of range)
  1848.  
  1849. (Table 1155)
  1850. Call PENDEV.SYS function to set entry point with:
  1851.     AX = index of entry point (0-9)
  1852.     DX:SI -> new handler
  1853. Return: CF clear if successful
  1854.     CF set on error (AX out of range)
  1855.  
  1856. (Table 1156)
  1857. Call PENDEV.SYS function to clear entry point with:
  1858.     AX = index of entry point (0-9)
  1859. Return: CF clear if successful
  1860.     CF set on error (AX out of range)
  1861. Note:    resets the jump at the specified entry point to its default target,
  1862.       which simply returns
  1863. --------N-214402-----------------------------
  1864. INT 21 U - LAN Manager - TCPDRV.DOS - API
  1865.     AX = 4402h
  1866.     BX = file handle referencing device "TCPDRV$"
  1867.     CX = 0019h
  1868.     DS:DX -> buffer containing request block (see #1157)
  1869. Return: CF clear if successful
  1870.         buffer filled
  1871.     CF set on error
  1872.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1873. Program: TCPDRV.DOS is the low-level device driver supporting LAN Manager's
  1874.       TCP/IP protocol stack
  1875.  
  1876. Format of TCPDRV.DOS request block:
  1877. Offset    Size    Description    (Table 1157)
  1878.  00h    BYTE    (call) function number
  1879.         00h initialize ???
  1880.         06h get ???
  1881.         07h get ???
  1882.  01h    BYTE    (call) 00h
  1883.         (ret) error code if error, unchanged if successful
  1884.  02h    WORD    signature 4354h ('CT')
  1885. ---function 00h---
  1886.  04h    DWORD    (call) pointer to ??? FAR function
  1887.         function is called with ES:BX -> device driver request used to
  1888.           invoke this function
  1889.  08h  4 BYTEs    ???
  1890.  0Ch    DWORD    (call) pointer to ??? record, WORD at offset 22h is read
  1891.  10h    DWORD    (ret) -> ??? buffer if 0000h:0000h on call
  1892. ---function 06h---
  1893.  04h  4 BYTEs    ???
  1894.  08h    DWORD    (ret) pointer to ???
  1895. ---function 07h---
  1896.  04h    DWORD    (ret) pointer to ??? record
  1897. --------y-214402-----------------------------
  1898. INT 21 U - PC Tools 9 CPRLOW.EXE - GET CODE AND DATA ADDRESSES
  1899.     AX = 4402h
  1900.     BX = file handle referencing device "RECLOWLD"
  1901.     DS:DX -> buffer for address list (see #1158)
  1902.     CX ignored
  1903. Return: CF clear if successful
  1904.         buffer filled
  1905.     CF set on error
  1906.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1907.  
  1908. Format of CPRLOW address list:
  1909. Offset    Size    Description    (Table 1158)
  1910.  00h    WORD    segment of CPRLOW code
  1911.  02h    WORD    offset in code segment of ??? entry point
  1912.         (switches into protected mode)
  1913.  04h    WORD    offset in code segment of jump array (see #1159)
  1914.  06h    WORD    segment of copy of interrupt vector table at CPRLOW load time
  1915. Note:    neither the entry point nor the jump array is valid until after a
  1916.       CPR /LOAD, because CPR.EXE installs the code into CPRLOW at runtime.
  1917.  
  1918. Format of CPRLOW jump array:
  1919. Offset    Size    Description    (Table 1159)
  1920.  00h  3 BYTEs    initialize CPRLOW interrupt hooks
  1921.  03h  3 BYTEs    reset timers and enable CPR (hotkey enable)
  1922.  06h  3 BYTEs    disable CPR (hotkey disable)
  1923.  09h  3 BYTEs    clear ??? flag, hotkey disable, and ???
  1924.  0Ch  3 BYTEs    initialize delay loop counter (destroys AX,BX,CX,DX)
  1925.  0Fh  3 BYTEs    disable CPR completely (commandline /DISABLE)
  1926.  12h  3 BYTEs    enable ??? if CPR enabled by both cmdline and hotkey
  1927.  15h  3 BYTEs    enable CPR (commandline /ENABLE)
  1928. --------s-214402-----------------------------
  1929. INT 21 U - Creative Technology CTMMSYS.SYS v1.00.01 - API
  1930.     AX = 4402h
  1931.     BX = file handle for device "CTMMSYS$"
  1932.     CX = 0004h (size of data)
  1933.     DS:DX -> buffer for entry point (see #1160)
  1934. Return: CF clear if successful
  1935.         buffer updated
  1936.     CF set on error
  1937.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1938. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  1939.       driver
  1940. SeeAlso: AX=4402h"CTSB2",INT 80/BX=0000h"SBFM"
  1941.  
  1942. Format of CTMMSYS.SYS entry point record:
  1943. Offset    Size    Description    (Table 1160)
  1944.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  1945.         (ret) pointer to CTMMSYS entry point (see #1161)
  1946. SeeAlso: #1162
  1947.  
  1948. (Table 1161)
  1949. Call CTMMSYS.SYS entry point with:
  1950.     AX = ???
  1951.     STACK:    WORD    ???
  1952.         WORD    ???
  1953.         WORD    ??? (0001h,0002h,0005h,0006h)
  1954.         WORD    ???
  1955.         DWORD    -> ???
  1956.         WORD    ???
  1957.         WORD    ???
  1958. Return: DX:AX = ??? or error code
  1959.         0000h:000Bh invalid value for ???
  1960.         0000h:000Fh API call already in progress
  1961. SeeAlso: #1160
  1962. --------s-214402-----------------------------
  1963. INT 21 U - Creative Technology CTSB2.SYS v1.01.01 - API
  1964.     AX = 4402h
  1965.     BX = file handle for device "CTSOUND0"
  1966.     CX = 0004h (size of data)
  1967.     DS:DX -> buffer for entry point (see #1162)
  1968. Return: CF clear if successful
  1969.         buffer updated
  1970.     CF set on error
  1971.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  1972. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  1973.       driver
  1974. SeeAlso: AX=4402h"CTMMSYS",INT 80/BX=0000h"SBFM"
  1975.  
  1976. Format of CTSB2.SYS entry point record:
  1977. Offset    Size    Description    (Table 1162)
  1978.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  1979.         (ret) pointer to CTSB2 entry point (see #1163)
  1980. SeeAlso: #1160
  1981.  
  1982. (Table 1163)
  1983. Call CTSB2.SYS entry point with:
  1984.     AX = ???
  1985.     STACK:    DWORD    -> ???
  1986.         WORD    function number
  1987.             (0100h,0200h,0300h,0400h,0500h,0600h,0701h)
  1988.         DWORD    -> ???
  1989.         WORD    ???
  1990.         WORD    ???
  1991. Return: DX:AX = ??? or error code
  1992.         0000h:0004h invalid subfunction???
  1993.         0000h:000Bh invalid value for ???
  1994.         0000h:000Fh API call already in progress
  1995. SeeAlso: #1162
  1996. --------m-214402-----------------------------
  1997. INT 21 U - Novell DOS 7 EMM386.EXE - GET STATE RECORD???
  1998.     AX = 4402h
  1999.     BX = file handle for device "EMMXXXX0"
  2000.     CX = 003Eh (size of state record)
  2001.     DS:DX -> buffer for state record (see #1164)
  2002. Return: CF clear if successful
  2003.         buffer filled (see #3235 at INT 67/AH=3Fh)
  2004.     CF set on error
  2005.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2006.  
  2007. Format of Novell DOS 7 EMM386.EXE state record:
  2008. Offset    Size    Description    (Table 1164)
  2009.  00h    WORD    signature EDC0h
  2010.  02h 60 BYTEs    ???
  2011. --------m-214402SF00-------------------------
  2012. INT 21 U - Memory Managers - GET API ENTRY POINT
  2013.     AX = 4402h subfn 00h
  2014.     BX = file handle for device "EMMXXXX0"
  2015.     CX = 0006h (size of buffer in bytes)
  2016.     DS:DX -> buffer for API entry point record (see #1165)
  2017.         first byte must be 00h on entry
  2018. Return: CF clear if successful
  2019.         buffer filled (see #3235 at INT 67/AH=3Fh)
  2020.     CF set on error
  2021.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2022. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  2023.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  2024.     if no other program has hooked INT 67, an alternate installation
  2025.       check for CEMM is testing for the string
  2026.       "COMPAQ EXPANDED MEMORY MANAGER 386" at offset 14h in the INT 67
  2027.       handler's segment; if present, the word at offset 12h contains the
  2028.       offset of the API entry point
  2029. SeeAlso: AX=4402h/SF=01h,AX=4402h/SF=02h,AX=4402h"EMM386",INT 67/AH=3Fh
  2030.  
  2031. Format of memory manager API entry point record:
  2032. Offset    Size    Description    (Table 1165)
  2033.  00h    WORD    ??? (0022h for CEMM 5.11, 0025h for MS EMM386 v4.45)
  2034.  02h    DWORD    manager's private API entry point
  2035.         (see #1166,#3298 at INT 67/AX=FFA5h)
  2036.  
  2037. (Table 1166)
  2038. Call CEMM v5.10+ entry point with:
  2039.     AH = 00h get memory manager's state
  2040.         Return: AH = state
  2041.             bit 0: turned OFF
  2042.             bit 1: AUTO mode enabled
  2043.     AH = 01h set memory manager's state
  2044.         AL = new state (00h ON, 01h OFF, 02h AUTO)
  2045.         Return: CF clear if successful
  2046.             CF set on error
  2047.     AH = 02h Weitek coprocessor support
  2048.         AL = subfunction
  2049.         00h get Weitek support state
  2050.             Return: AL = status
  2051.                 bit 0: Weitek coprocessor is present
  2052.                 bit 1: Weitek support is enabled
  2053.         01h turn on Weitek support
  2054.         02h turn off Weitek support
  2055.         Return: CF clear if successful
  2056.             CF set on error
  2057.             AH = error code (01h invalid subfunc, 02h no Weitek)
  2058.     AH = 05h get statistics
  2059.         ???
  2060.     AH > 06h
  2061.         Return: CF set
  2062.             AH = 01h (invalid function)
  2063. Notes:    AH=03h,04h,06h are NOPs which return CF clear, presumably for backwards
  2064.       compatibility with earlier versions of CEMM
  2065.     in v5.11, AH=05h merely prints an error message (using INT 21/AH=09h)
  2066.       stating that a different version of CEMM is installed and it is
  2067.       therefore not possible to display the statistics
  2068. --------m-214402SF01-------------------------
  2069. INT 21 U - Memory Managers - GET EMM IMPORT STRUCTURE ADDRESS
  2070.     AX = 4402h subfn 01h
  2071.     BX = file handle for device "EMMXXXX0"
  2072.     CX = 0006h (size of buffer in bytes)
  2073.     DS:DX -> buffer for EMM import structure record (see #1167)
  2074.         first byte must be 01h on entry
  2075. Return: CF clear if successful
  2076.         buffer filled (see also #3235 at INT 67/AH=3Fh)
  2077.     CF set on error
  2078.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2079. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+,
  2080.       QEMM-386 v6+, and CEMM v5.10+, and is intended for use by MS Windows
  2081.       as it starts up
  2082.     for QEMM-386, this call always returns an error if Windows3 support
  2083.       has been disabled with the NW3 switch
  2084. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 2F/AX=D201h/BX=5145h
  2085. SeeAlso: INT 67/AH=3Fh
  2086.  
  2087. Format of EMM import structure record:
  2088. Offset    Size    Description    (Table 1167)
  2089.  00h    DWORD    physical address of EMM import structure (see #1168)
  2090.  04h    BYTE    EMM import structure major version
  2091.  05h    BYTE    EMM import structure minor version
  2092. Note:    version 1.00 contains only EMS information (Windows 3.0+)
  2093.     version 1.10 contains UMB/XMS/HMA/EMS information (Windows 3.1)
  2094.     version 1.11 is version 1.10 plus memory manager maker/product name
  2095. SeeAlso: #3275
  2096.  
  2097. Format of Global EMM Import record:
  2098. Offset    Size    Description    (Table 1168)
  2099.  00h    BYTE    bit flags
  2100.         bit 2: ???
  2101.         bit 3: free EMM386 virtual HMA only if hma_page_table_paddr!=0
  2102.         bit 4: no UMB???
  2103.  01h    BYTE    reserved (0)
  2104.  02h    WORD    size of structure in bytes
  2105.  04h    WORD    structure version
  2106.  06h    DWORD    reserved
  2107.  0Ah 384 BYTEs    64 EMS frame status records (see #1169), one per 16K of
  2108.           real-mode 1M address space
  2109. 18Ah    BYTE    ??? (must be at least 3*number_of_EMS_frames+4)
  2110. 18Bh    BYTE    number of UMB frame descriptors following
  2111. 18Ch 4N DWORDs    UMB frame descriptors
  2112.         each is 4 DWORDs giving physical page numbers for the four
  2113.           4K pages of a 16K EMS frame (00000000h if non-UMB page)
  2114. var    BYTE    number of EMS handle info records following
  2115.     16N BYTEs    EMS handle info records (see #1171)
  2116. ---version 1.10+ ---
  2117.     DWORD    realmode INT 67 vector (used by Windows to set breakpoints)
  2118.     DWORD    physical address of HMA page table values
  2119.     BYTE    number of free page entries following
  2120.      2N DWORDs    free page entries
  2121.         each is:
  2122.             DWORD    physical page number
  2123.             DWORD    number of consecutive physical pages
  2124.     BYTE    number of XMS handle info records following
  2125.         00h if memory manager does not emulate XMS or has real mode
  2126.           XMS code which can execute in the Windows environment
  2127.     12N BYTEs    XMS handle info records (see #1172)
  2128.     BYTE    number of free UMB info records following
  2129.      2N WORDs    free UMB info records
  2130.         each is:
  2131.             WORD    real mode start segment
  2132.             WORD    size in paragraphs
  2133. ---version 1.11---
  2134.      20 BYTEs    blank-padded maker name
  2135.      20 BYTEs    blank-padded product name
  2136.  
  2137. Format of EMS frame status record:
  2138. Offset    Size    Description    (Table 1169)
  2139.  00h    BYTE    frame type (see #1170)
  2140.  01h    BYTE    owner handle (00h/FFh = none) from frame including UMB
  2141.         index to UMB frame descriptors
  2142.  02h    WORD    logical page for frame, 7FFFh if none, FFFFh if non-EMS frame
  2143.  04h    BYTE    EMS physical page number (FFh for non-EMS = don't care???)
  2144.  05h    BYTE    flags for non-EMS frames (00h for EMS frame)
  2145.         bits 0,1 for first 4K, bits 2,3 for second 4K, etc:
  2146.           10: direct mapping (linear address = physical address)
  2147.           01: UMB mapping
  2148.  
  2149. Bitfields for EMS frame type:
  2150. Bit(s)    Description    (Table 1170)
  2151.  0    EMS frame
  2152.  1    (if EMS frame) in standard 64K page frame
  2153.  2    first 4K of frame is UMB
  2154.  3    second 4K of frame is UMB
  2155.  4    third 4K of frame is UMB
  2156.  5    last 4K of frame is UMB
  2157.  
  2158. Format of EMS handle info record:
  2159. Offset    Size    Description    (Table 1171)
  2160.  00h    BYTE    handle number (00h = system handle)
  2161.  01h    BYTE    flags
  2162.         bit 0: normal handle rather than system handle
  2163.         bit 2: ??? (set by some EMS managers)
  2164.  02h  8 BYTEs    EMS handle's name
  2165.  0Ah    WORD    number of 16K pages for handle
  2166.  0Ch    DWORD    physical address of page table entries forming page map
  2167. Note:    all values should be zero for the system handle if no large frame
  2168.       support is present
  2169.  
  2170. Format of XMS handle info record:
  2171. Offset    Size    Description    (Table 1172)
  2172.  00h    WORD    handle
  2173.  02h    WORD    flags
  2174.         bit 0: handle usable by Windows
  2175.             (already in use when Windows started if clear)
  2176.         bit 1: reserved (0)
  2177.  04h    DWORD    size in KB (may be zero, used only if flags bit 0 set)
  2178.  08h    DWORD    physical address (only if flags bit 0 set)
  2179. --------m-214402SF02-------------------------
  2180. INT 21 U - Memory Managers - GET MEMORY MANAGER VERSION
  2181.     AX = 4402h subfn 02h
  2182.     BX = file handle for device "EMMXXXX0"
  2183.     CX = 0002h (size of buffer in bytes)
  2184.     DS:DX -> buffer for memory manager version (see #1173)
  2185.         first byte must be 02h on entry
  2186. Return: CF clear if successful
  2187.         buffer filled
  2188.     CF set on error
  2189.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2190. Note:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  2191.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  2192. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 67/AH=3Fh
  2193.  
  2194. Format of memory manager version:
  2195. Offset    Size    Description    (Table 1173)
  2196.  00h    BYTE    major version
  2197.  01h    BYTE    minor version (binary)
  2198. --------m-214402-----------------------------
  2199. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  2200.     AX = 4402h
  2201.     BX = file handle for device "EMMXXXX0"
  2202.     CX = size of buffer in bytes (varies, see #1174)
  2203.     DS:DX -> buffer for returned data (see #1174)
  2204.         first byte must be set on entry to indicate desired data
  2205. Return: CF clear if successful
  2206.         buffer filled
  2207.     CF set on error
  2208.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2209. Notes:    an error is returned if the number of bytes to be read does not match
  2210.       the number of bytes returned for the specified data item
  2211.     this function is part of the interface which allows MS Windows to
  2212.       cooperate with memory managers
  2213. SeeAlso: AX=4402h/SF=00h,AX=4402h/SF=01h,AX=4402h/SF=02h,INT 67/AX=FFA5h
  2214.  
  2215. Format of EMM386.EXE data buffer:
  2216. Offset    Size    Description    (Table 1174)
  2217.  00h    BYTE    (call) function
  2218.         03h get ???
  2219.         04h get ???
  2220. ---function 03h---
  2221.  00h    WORD    ???
  2222.  02h    WORD    ???
  2223. ---function 04h---
  2224.  00h    WORD    segment of UMB containing EMM386 code/data
  2225.  02h    WORD    number of paragraphs of EMM386 code/data in UMB
  2226.  04h    WORD    ???
  2227. ----------214402-----------------------------
  2228. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  2229.     AX = 4402h
  2230.     BX = file handle for device "IFS$HLP$"
  2231.     CX = 0008h (size of buffer in bytes)
  2232.     DS:DX -> buffer for entry point record (see #1068 at AH=3Fh"IFSHLP")
  2233. Return: CF clear if successful
  2234.         buffer filled
  2235.     CF set on error
  2236.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2237. SeeAlso: AH=3Fh"IFSHLP"
  2238. --------D-214403-----------------------------
  2239. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  2240.     AX = 4403h
  2241.     BX = file handle referencing character device
  2242.     CX = number of bytes to write
  2243.     DS:DX -> data to write
  2244. Return: CF clear if successful
  2245.         AX = number of bytes actually written
  2246.     CF set on error
  2247.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2248. Notes:    format of data is driver-specific
  2249.       (also see separate entries below for some specific cases)
  2250.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  2251.       KEYSTACK.SYS driver will push the specified characters on the
  2252.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  2253.       driver will push the characters onto the keyboard stack
  2254. SeeAlso: AX=4400h,AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  2255. SeeAlso: INT 2F/AX=D44Dh,INT 2F/AX=D44Fh
  2256. --------c-214403-----------------------------
  2257. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - CACHE CONTROL
  2258.     AX = 4403h
  2259.     BX = handle for device "SMARTAAR"
  2260.     CX = number of bytes to write
  2261.     DS:DX -> SMARTDRV control block (see #1176)
  2262. Return: CF clear if successful
  2263.         AX = number of bytes actually written
  2264.         0000h if control block too small for given command
  2265.     CF set on error
  2266.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2267. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  2268.       interface, but does not do so correctly, often hanging the system;
  2269.       one should use the SmartDrive v4.x or NCache private interfaces
  2270.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  2271. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  2272.  
  2273. (Table 1175)
  2274. Values for SMARTDRV function code:
  2275.  00h    flush cache
  2276.  01h    flush and discard cache
  2277.  02h    disable caching (flushes and discards cache first)
  2278.  03h    enable caching
  2279.  04h    control write caching
  2280.  05h    set flushing tick count
  2281.  06h    lock cache contents
  2282.  07h    unlock cache contents
  2283.  08h    set flush-on-reboot flag
  2284.  09h    unused
  2285.  0Ah    control full-track caching
  2286.  0Bh    reduce cache size
  2287.  0Ch    increase cache size
  2288.  0Dh    set INT 13 chain address
  2289.  
  2290. Format of SMARTDRV control block:
  2291. Offset    Size    Description    (Table 1176)
  2292.  00h    BYTE    function code (see #1175)
  2293. ---functions 00h-03h,06h,07h---
  2294.  no additional fields
  2295. ---function 04h---
  2296.  01h    BYTE    write caching control action
  2297.         00h turn off write-through
  2298.         01h turn on write-through
  2299.         02h turn off write buffering (also flushes cache)
  2300.         03h turn on write buffering (also flushes cache)
  2301. ---function 05h---
  2302.  01h    WORD    number of timer ticks between cache flushes
  2303. ---function 08h---
  2304.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  2305. ---function 0Ah---
  2306.  01h    BYTE    full-track writes are
  2307.         00h not cached
  2308.         01h cached
  2309. ---functions 0Bh,0Ch---
  2310.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  2311. ---function 0Dh---
  2312.  01h    DWORD    new address to which to chain on INT 13
  2313. Note:    the previous address is not preserved
  2314. --------d-214403-----------------------------
  2315. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  2316.     AX = 4403h
  2317.     BX = file handle referencing character device for CD-ROM driver
  2318.     CX = number of bytes to write
  2319.     DS:DX -> control block (see #1177)
  2320. Return: CF clear if successful
  2321.         AX = number of bytes actually written
  2322.     CF set on error
  2323.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2324. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  2325.  
  2326. Format of CR-ROM control block:
  2327. Offset    Size    Description    (Table 1177)
  2328.  00h    BYTE    function code
  2329.         00h eject disk
  2330.         01h lock/unlock door
  2331.         02h reset drive
  2332.         03h control audio channel
  2333.         04h write device control string
  2334.         05h close tray
  2335. ---functions 00h,02h,05h---
  2336.  no further fields
  2337. ---function 01h---
  2338.  01h    BYTE    lock function
  2339.         00h unlock door
  2340.         01h lock door
  2341. ---function 03h---
  2342.  01h    BYTE    input channel (0-3) for output channel 0
  2343.  02h    BYTE    volume for output channel 0
  2344.  03h    BYTE    input channel (0-3) for output channel 1
  2345.  04h    BYTE    volume for output channel 1
  2346.  05h    BYTE    input channel (0-3) for output channel 2
  2347.  06h    BYTE    volume for output channel 2
  2348.  07h    BYTE    input channel (0-3) for output channel 3
  2349.  08h    BYTE    volume for output channel 3
  2350. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  2351.       right prime; a volume of 00h is off
  2352. ---function 04h---
  2353.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  2354.           interpretation
  2355. --------D-214403-----------------------------
  2356. INT 21 U - MS-DOS 7.0 - CONFIG$ device - SET??? CONFIGURATION INFORMATION
  2357.     AX = 4403h
  2358.     BX = file handle for character device "CONFIG$"
  2359.     CX = number of bytes to write
  2360.     DS:DX -> buffer containing ???
  2361. Return: CF clear if successful
  2362.         AX = number of bytes actually written
  2363.     CF set on error
  2364.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2365. Note:    IOCTL Output to CONFIG$ is only available while IO.SYS is booting
  2366.       the system; once CONFIG.SYS has been processed, this call always
  2367.       succeeds, ignoring any input
  2368. SeeAlso: AX=4403h"CONFIG$"
  2369. --------d-214403-----------------------------
  2370. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  2371.     AX = 4403h
  2372.     BX = handle for device "SCSITAPE"
  2373.     CX = number of bytes to write
  2374.     DS:DX -> SCSITAPE control block (see #1178)
  2375. Return: CF clear if successful
  2376.         AX = number of bytes actually written
  2377.     CF set on error
  2378.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2379. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  2380.  
  2381. Format of SCSITAPE control block:
  2382. Offset    Size    Description    (Table 1178)
  2383.  00h    WORD    command type
  2384.         'F' Format (argument 1 = interleave, argument 2 = format type)
  2385.         'E' Erase
  2386.         'R' Rewind
  2387.         'L' Load
  2388.         'N' No Load
  2389.         'S' Space (argument 1 = count, argument 2 = type)
  2390.         'M' File Mark (argument 1 = count)
  2391.         'A' Reassign
  2392.  02h    WORD    argument 1
  2393.  04h    WORD    argument 2
  2394.  06h    WORD    segment of command buffer
  2395.  08h    WORD    offset of command buffer
  2396.  0Ah    WORD    length of command buffer
  2397. --------E-214403-----------------------------
  2398. INT 21 U - AI Architects - OS/x86??? - API
  2399.     AX = 4403h
  2400.     BX = handle for device "AIA_OS"
  2401.     CX = number of bytes to write (ignored)
  2402.     DS:DX -> 12-byte buffer (see #1179), first byte is command:
  2403.           81h installation check
  2404.           82h get API entry point
  2405.           84h uninstall
  2406. Return: CF clear if successful
  2407.         AX = number of bytes actually written
  2408.         DS:DX buffer filled
  2409.     CF set on error
  2410.         AX = error code (01h,05h,06h,0Ch,0Dh) (see #1332 at AH=59h)
  2411. Notes:    these functions are only available if the DOS extender was loaded as a
  2412.       device driver in CONFIG.SYS
  2413.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  2414. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  2415. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  2416.  
  2417. Format of buffer on return:
  2418. Offset    Size    Description    (Table 1179)
  2419.  00h  4 BYTEs    signature "IABH"
  2420. ---if function 81h---
  2421.  (no additional fields)
  2422. ---if function 82h---
  2423.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  2424. ---if function 84h---
  2425.  04h    WORD    success indicator
  2426.  06h    WORD    segment of ???
  2427.  08h    WORD    segment of ??? memory block to free if nonzero
  2428.  0Ah    WORD    segment of ??? memory block to free if nonzero
  2429. --------V-214403-----------------------------
  2430. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  2431.     AX = 4403h
  2432.     BX = file handle for device "PGS1600$"
  2433.     CX = 0018h (size of buffer)
  2434.     DS:DX -> configuration buffer (see #1137 at AX=4402h"PGS1600")
  2435. Return: CF clear if successful
  2436.         AX = number of bytes actually written
  2437.     CF set on error
  2438.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2439. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  2440.       display adapter, which provides a 1600x1200 monochrome display as
  2441.       well as one of two emulations, MDA or CGA.
  2442. SeeAlso: AX=4402h"PGS1600"
  2443. --------N-214403-----------------------------
  2444. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  2445.     AX = 4403h
  2446.     BX = file handle referencing device "$IPCUST"
  2447.     CX, DS:DX ignored
  2448. Return: CF clear if successful
  2449.         AX destroyed
  2450.     CF set on error
  2451.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2452. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  2453.       version 2.05.     If less than the entire data is read or written,
  2454.       the next read/write continues where the previous one ended; this
  2455.       call and AX=4402h both reset the location at which the next
  2456.       operation starts to zero
  2457.     v2.1+ uses a new configuration method, but allows the installation
  2458.       of IPCUST.SYS for backward compatibility with other software which
  2459.       must read the PC/TCP configuration
  2460. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  2461. --------V-214403-----------------------------
  2462. INT 21 - Compaq AG1024.SYS - CPQ_MGES - IOCTL OUTPUT
  2463.     AX = 4403h
  2464.     BX = file handle referencing device "CPQ_MGES"
  2465.     DS:DX -> request packet (see #1180)
  2466.     CX ignored
  2467. Return: CF clear if successful
  2468.         AX destroyed
  2469.         data buffer filled (if applicable)
  2470.         first word of request packet set to number of bytes of data
  2471.           available (amount returned is smaller of this and requested
  2472.           amount)
  2473.     CF set on error
  2474.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2475. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  2476. SeeAlso: AX=4403h"RGDI"
  2477.  
  2478. Format of Compaq AG1024.SYS request packet:
  2479. Offset    Size    Description    (Table 1180)
  2480.  00h    WORD    function
  2481.         0000h get ??? (26h bytes)
  2482.         0001h get ??? (36h bytes)
  2483.         0002h set ??? (same as returned by function 0001h)
  2484.         0003h get ??? (6 bytes)
  2485.         0004h get ???
  2486.         0005h get ???
  2487.         0006h get ??? (10h bytes)
  2488.         0007h set ??? (same as returned by function 0006h)
  2489. ---functions 00h-03h,06h,07h---
  2490.  02h    WORD    size of data buffer
  2491.  04h    DWORD    -> buffer for function's data
  2492.  ---functions 04h,05h---
  2493.  02h    WORD    ???
  2494.  04h    WORD    size of data buffer
  2495.  06h    DWORD    -> buffer to receive data
  2496. --------V-214403-----------------------------
  2497. INT 21 - Compaq AG1024.SYS - RGDI - IOCTL OUTPUT
  2498.     AX = 4403h
  2499.     BX = file handle referencing device "$$$$RGDI"
  2500.     DS:DX -> request packet (see #1181)
  2501.     CX ignored
  2502. Return: CF clear if successful
  2503.         AX destroyed
  2504.         data buffer filled (if applicable)
  2505.         first word of request packet set to number of bytes of data
  2506.           available (amount returned is smaller of this and requested
  2507.           amount)
  2508.     CF set on error
  2509.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2510. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  2511. SeeAlso: AX=4402h"RGDI",AX=4403h"CPQ_MGES"
  2512.  
  2513. Format of Compaq AG1024.SYS request packet:
  2514. Offset    Size    Description    (Table 1181)
  2515.  00h    WORD    function
  2516.         0000h get entry points
  2517.         0001h get ???
  2518.  02h    DWORD    address of buffer for returned data
  2519. --------m-214403SF01-------------------------
  2520. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX OFF
  2521.     AX = 4403h subfn 01h
  2522.     BX = handle for device "386MAX$$"
  2523.     DS:DX -> BYTE 01h
  2524.     CX ignored
  2525. Return: DS:DX -> BYTE status (00h = successful)
  2526.     CF clear if successful
  2527.         AX destroyed
  2528.     CF set on error
  2529.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2530. Note:    this function will fail if any EMS or UMBs are in use
  2531. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2532. --------m-214403SF02-------------------------
  2533. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX ON
  2534.     AX = 4403h subfn 02h
  2535.     BX = handle for device "386MAX$$"
  2536.     DS:DX -> BYTE 02h
  2537.     CX ignored
  2538. Return: DS:DX -> BYTE status (00h = successful)
  2539.     CF clear if successful
  2540.         AX destroyed
  2541.     CF set on error
  2542.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2543. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2544. --------m-214403SF03-------------------------
  2545. INT 21 U - Qualitas 386MAX v6.01+ - SET STATE
  2546.     AX = 4403h subfn 03h
  2547.     BX = handle for device "386MAX$$"
  2548.     CX = number of bytes to copy (up to size of state buffer)
  2549.     DS:DX -> BYTE 03h followed by state buffer
  2550.           (see #1120 at AX=4402h"386MAX")
  2551. Return: CF clear if successful
  2552.         AX = number of bytes actually written
  2553.     CF set on error
  2554.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2555. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  2556.       (specifying the version of the state record) and the buffer must
  2557.       contain CX bytes AFTER the initial byte
  2558. SeeAlso: AX=4402h"386MAX"
  2559. --------m-214403SF05-------------------------
  2560. INT 21 U - Qualitas 386MAX v7.00+ - LIMIT AUTOMATIC ACTIVATION TO STD EMS CALLS
  2561.     AX = 4403h subfn 05h
  2562.     BX = handle for device "386MAX$$"
  2563.     DS:DX -> BYTE 05h
  2564.     CX ignored
  2565. Return: CF clear if successful
  2566.         AX destroyed
  2567.     CF set on error
  2568.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2569. Desc:    specifies that 386MAX will only shift from AUTO to ON mode on standard
  2570.       EMS calls INT 67/AH=40h-5Dh
  2571. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=06h
  2572. --------m-214403SF06-------------------------
  2573. INT 21 U - Qualitas 386MAX v7.00+ - ALLOW AUTOMATIC ACTIVATION ON ANY INT 67
  2574.     AX = 4403h subfn 06h
  2575.     BX = handle for device "386MAX$$"
  2576.     DS:DX -> BYTE 06h
  2577.     CX ignored
  2578. Return: CF clear if successful
  2579.         AX destroyed
  2580.     CF set on error
  2581.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2582. Desc:    specified that 386MAX should shift from AUTO to ON mode on any INT 67
  2583.       call other than INT 67/AH=3Fh
  2584. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2585. --------n-214403-----------------------------
  2586. INT 21 U - PenDOS PENDEV.SYS - ???
  2587.     AX = 4403h
  2588.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  2589.     CX = size of buffer
  2590.     DS:DX -> buffer containing ???
  2591. Return: CF clear if successful
  2592.         buffer filled
  2593.     CF set on error
  2594.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2595. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  2596.       which provides pen capability to keyboard-based programs, is bundled
  2597.       with IBM DOS 6.1
  2598. Note:    this call sets the WORD at offset 1Ah into the device driver request
  2599.       header used to call the driver to 0000h.
  2600. SeeAlso: AX=4402h"PENDEV.SYS"
  2601. --------D-214404-----------------------------
  2602. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  2603.     AX = 4404h
  2604.     BL = drive number (00h = default, 01h = A:, etc.)
  2605.     CX = number of bytes to read
  2606.     DS:DX -> buffer
  2607. Return: CF clear if successful
  2608.         AX = number of bytes actually read
  2609.     CF set on error
  2610.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2611. Note:    format of data is driver-specific
  2612. SeeAlso: AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  2613. --------k-214404-----------------------------
  2614. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  2615.     AX = 4404h
  2616.     BL = drive number (00h = default, 01h = A:, etc.)
  2617.     CX = 0004h
  2618.     DS:DX -> DWORD buffer to receive device driver address
  2619. Return: buffer filled with pointer into Stacker device driver (see #2205):
  2620.       driver + 19h if Stacker Anywhere controls this drive
  2621.       driver + 1Ah if Stacker controls this drive
  2622.       unchanged else
  2623. Notes:    in addition to returning the address of the Stacker device driver,
  2624.       this call also sets the volume number at offset 58h in the device
  2625.       driver (see #2205 at INT 25/AX=CDCDh)
  2626.     Stacker Anywhere does not link its built-in device driver into
  2627.       the standard device driver chain, but it can be found via CDS/DPB
  2628.     this call can be used as an installation check for all versions of
  2629.       Stacker and Stacker Anywhere to avoid the INT 25 call
  2630. SeeAlso: AX=4408h,AX=440Eh,AH=52h,INT 25/AX=CDCDh
  2631. --------k-214404-----------------------------
  2632. INT 21 - Stacker - GET STACVOL FILE SECTORS
  2633.     AX = 4404h
  2634.     BL = drive number (0 is current drive)
  2635.     CX = byte count (i.e., 200h = 1 sector)
  2636.     DS:DX -> buffer (see #1182)
  2637. Return: Data Buffer contains the number of sectors requested from the
  2638.       STACVOL physical file for the drive specified.
  2639.  
  2640. Format of Stacker buffer:
  2641. Offset    Size    Description    (Table 1182)
  2642.  00h    WORD    01CDh
  2643.  02h    WORD    sector count
  2644.  04h    DWORD    number of starting sector
  2645.  08h    DWORD    far pointer to Data Buffer
  2646. --------k-214404-----------------------------
  2647. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  2648.     AX = 4404h
  2649.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  2650.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  2651.     DS:DX -> data record (see #1183)
  2652. Return: CF clear if successful
  2653.         AX = number of bytes read
  2654.     CF set on error
  2655.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2656. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  2657.       expander by Vertisoft Systems, Inc.
  2658. Note:    the installation check for v2.6 consists of scanning memory for the
  2659.       signature "FAT 2.6  byte:", which is immediately followed by a data
  2660.       table (see #1184)
  2661. BUG:    VOPT (a disk optimizer by Golden Bow Software) assumes that any driver
  2662.       which returns the "correct" number of bytes when the first word of
  2663.       the buffer for the data record contains the signature value 4444h is
  2664.       DoubleDisk; a workaround is for the non-DoubleDisk driver to return
  2665.       no data if the signature is present
  2666. SeeAlso: AX=440Dh"DOS 3.2+"
  2667. Index:    installation check;DUBLDISK.SYS
  2668.  
  2669. Format of DUBLDISK data record:
  2670. Offset    Size    Description    (Table 1183)
  2671.  00h    WORD    (call) signature 4444h
  2672.  02h    BYTE    (call) function
  2673.             00h ???
  2674.             01h ???
  2675. ---function 00h---
  2676.  02h    BYTE    (ret) ???
  2677.  03h    BYTE    (ret) ???
  2678. ---function 01h---
  2679.  02h    WORD    (ret) 4444h
  2680.  04h    WORD    allocation unit size???
  2681.  06h    WORD    ???
  2682.  08h    WORD    ???
  2683.  0Ah    BYTE    ???
  2684.  
  2685. Format of DUBLDISK signature data table:
  2686. Offset    Size    Description    (Table 1184)
  2687.  00h  5 BYTEs    ???
  2688.  05h    BYTE    first drive number
  2689.  06h    BYTE    number of drives
  2690.  07h    ???
  2691. --------k-214404-----------------------------
  2692. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  2693.     AX = 4404h
  2694.     BL = drive number (00h = default, 01h = A:, etc)
  2695.     CX = 000Ah (size of DSPACKET structure)
  2696.     DS:DX -> DSPACKET structure (see #1185)
  2697. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2698.         AX = number of bytes actually transferred
  2699.     CF set on error
  2700.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2701. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  2702.  
  2703. Format of DoubleSpace DSPACKET structure:
  2704. Offset    Size    Description    (Table 1185)
  2705.  00h    WORD    signature 444Dh ("DM")
  2706.  02h    BYTE    command code
  2707.         46h ('F') flush internal caches
  2708.         49h ('I') flush and invalidate internal caches
  2709.  03h    WORD    result code
  2710.         (ret) 4F4Bh ("OK") if successful, else unchanged
  2711.  05h  5 BYTEs    padding
  2712. --------k-214404-----------------------------
  2713. INT 21 - DBLSPACE.BIN v6.2 - IOCTL - GET ??? FOR SPECIFIED DRIVE
  2714.     AX = 4404h
  2715.     BL = drive number (00h = default, 01h = A:, etc)
  2716.     CX = size of DSPACKET structure (ignored in DOS 6.2)
  2717.     DS:DX -> DSPACKET structure (see #1186)
  2718. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2719.         AX = number of bytes actually transferred
  2720.     CF set on error
  2721.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2722. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  2723.  
  2724. Format of DoubleSpace DSPACKET structure:
  2725. Offset    Size    Description    (Table 1186)
  2726.  00h    WORD    signature 444Dh ("DM")
  2727.  02h    BYTE    command code
  2728.         53h ('S') get ??? for specified drive
  2729.  03h    WORD    result code
  2730.         (ret) 4F4Bh ("OK") if successful, else unchanged
  2731.  05h    DWORD    (ret) pointer to 96-byte ??? data
  2732.  09h    DWORD    (ret) pointer to ??? data
  2733.  0Dh  3 BYTEs    reserved
  2734. --------k-214404-----------------------------
  2735. INT 21 U - DoubleTools v1.0 - GET ???
  2736.     AX = 4404h
  2737.     BL = drive number (00h = default, 01h = A:, etc)
  2738.     CX = 0006h
  2739.     DS:DX -> DoubleTools structure (see #1187)
  2740. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2741.         AX = number of bytes actually transferred
  2742.     CF set on error
  2743.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2744. Note:    the Transporter device driver has the signature 55h 61h 50h 74h
  2745.       ("DaPt") twelve bytes after it beginning
  2746.  
  2747. Format of DoubleTools structure:
  2748. Offset    Size    Description    (Table 1187)
  2749.  00h    WORD    (call) signature 55h AAh
  2750.         (ret) signature 78h 70h ("xp")
  2751.  02h    WORD    (call) signature 52h 16h
  2752.         (ret) ???
  2753.  04h    WORD    (ret) segment of driver's DS (same as its PSP)
  2754. --------d-214404-----------------------------
  2755. INT 21 U - xDISK v3.31 - CONFIGURE
  2756.     AX = 4404h
  2757.     BL = drive number (00h = default, 01h = A:, etc)
  2758.     CX = 0047h (length of version string)
  2759.     DS:DX -> 79-byte buffer for version string and ???
  2760.     DS:0081h = commandline containing new switches for driver
  2761. Return: CF clear if successful
  2762.         AX = number of bytes actually transferred
  2763.     CF set on error
  2764.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2765. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  2766. SeeAlso: AX=4405h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  2767. --------c-214404-----------------------------
  2768. INT 21 - COMBI-disk v1.13 - GET DATA RECORD
  2769.     AX = 4404h
  2770.     BL = drive number (00h = default, 01h = A:, etc)
  2771.     CX = 0032h (length of data packet)
  2772.     DS:DX -> buffer for data packet (see #1188)
  2773. Return: CF clear if successful
  2774.         AX = number of bytes actually transferred
  2775.     CF set on error
  2776.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2777. Program: COMBI-disk is a shareware combination cache and RAMdisk sharing a
  2778.       single pool of memory by Vadim V. Vlasov
  2779. Note:    the installation check consists of scanning the valid drives for one
  2780.       which returns a correctly-sized data packet with the proper
  2781.       signature in the first field
  2782. SeeAlso: AX=4405h"COMBI"
  2783. Index:    installation check;COMBI-disk
  2784.  
  2785. Format of COMBI-disk data packet:
  2786. Offset    Size    Description    (Table 1188)
  2787.  00h  6 BYTEs    ASCIZ signature "COMBI"
  2788.  06h    WORD    version (high byte = major, low = decimal minor version)
  2789.  08h    BYTE    current options
  2790.  09h    BYTE    sectors per allocation block
  2791.  0Ah    WORD    maximum buffer in KB
  2792.  0Ch    WORD    current buffer in KB (less than max if XMS memory being lent)
  2793.  0Eh    WORD    total number of allocation blocks
  2794.  10h    WORD    current number of allocation blocks
  2795.  12h    WORD    number of blocks being used by RAM disk
  2796.  14h    WORD    number of blocks being used by cache or unused
  2797.  16h    WORD    number of dirty cache blocks
  2798.  18h    WORD    number of blocks which could not be written out due to errors
  2799.  1Ah    WORD    total number of read requests
  2800.  1Ch    WORD    total number of sectors read
  2801.  1Eh    WORD    number of BIOS read requests (cache misses)
  2802.  20h    WORD    number of sectors read via BIOS (cache misses)
  2803.  22h    WORD    total number of write requests
  2804.  24h    WORD    total number of sectors written
  2805.  26h    WORD    number of BIOS write requests
  2806.  28h    WORD    number of sectors written via BIOS
  2807.  2Ah    WORD    number of RAM disk read requests
  2808.  2Ch    WORD    number of sectors read from RAM disk
  2809.  2Eh    WORD    number of RAM disk write requests
  2810.  30h    WORD    number of sectors written to RAM disk
  2811. --------d-214404-----------------------------
  2812. INT 21 - SFS v1.00 - GET CONFIGURATION INFORMATION
  2813.     AX = 4404h
  2814.     BL = drive number (00h = default, 01h = A:, etc)
  2815.     CX = 001Ah (length of data packet)
  2816.     DS:DX -> buffer for data packet (see #1189)
  2817. Return: CF clear if successful
  2818.         AX = number of bytes actually transferred
  2819.     CF set on error
  2820.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2821. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  2822.       Peter C. Gutmann
  2823. SeeAlso: AX=4405h"SFS"
  2824.  
  2825. Format of SFS data packet:
  2826. Offset    Size    Description    (Table 1189)
  2827.  00h  4 BYTEs    signature string "SFS1"
  2828.  04h    WORD    SFS unit number (0-based)
  2829.  06h    WORD    drive on which the SFS volume is mounted
  2830.  08h    DWORD    sector offset of logical volume from start of physical volume
  2831.         0 if logical volume = physical volume
  2832.  0Ch    WORD    flag: 00h = no disk mounted, 01h = disk mounted
  2833.  0Eh    WORD    flag: 00h read/write, 01h read-only
  2834.  10h    WORD    quick-unmount hotkey
  2835.         (high byte = shift state, low = scan code) (see #0005)
  2836.  12h    WORD    auto-unmount time in minutes, or 0000h if already expired, or
  2837.         FFFFh if not set
  2838.  14h    WORD    time in minutes remaining before auto-unmount
  2839.  16h    WORD    internal driver check code
  2840.         0000h no error
  2841.         0001h driver consistency check failed
  2842.         0002h unit consistency check failed
  2843.  18h    WORD    disk access mode
  2844.         0000h BIOS
  2845.         0001h IDE direct access
  2846.         0002h SCSI direct access
  2847. --------D-214405-----------------------------
  2848. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  2849.     AX = 4405h
  2850.     BL = drive number (00h = default, 01h = A:, etc)
  2851.     CX = number of bytes to write
  2852.     DS:DX -> data to write
  2853. Return: CF clear if successful
  2854.         AX = number of bytes actually written
  2855.     CF set on error
  2856.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2857. Note:    format of data is driver-specific
  2858. SeeAlso: AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  2859. --------d-214405-----------------------------
  2860. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  2861.     AX = 4405h
  2862.     BX = drive number (00h = default, 01h = A:, etc)
  2863.     CX = number of bytes to write
  2864.     DS:DX -> SCSIDISK control block (see also #1178 at AX=4403h"ST-01")
  2865. Return: CF clear if successful
  2866.         AX = number of bytes actually written
  2867.     CF set on error
  2868.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2869. SeeAlso: AX=4403h"ST-01"
  2870. --------k-214405-----------------------------
  2871. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  2872.     AX = 4405h
  2873.     BL = drive number (00h = default, 01h = A:, etc)
  2874.     CX = 000Ah (size of DSPACKET structure)
  2875.     DS:DX -> DSPACKET structure (see #1190)
  2876. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2877.         AX = number of bytes actually transferred
  2878.     CF set on error
  2879.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2880. Note:    this call is identical to the documented AX=4404h
  2881. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  2882.  
  2883. Format of DoubleSpace DSPACKET structure:
  2884. Offset    Size    Description    (Table 1190)
  2885.  00h    WORD    signature 444Dh ("DM")
  2886.  02h    BYTE    command code
  2887.         46h ('F') flush internal caches
  2888.         49h ('I') flush and invalidate internal caches
  2889.  03h    WORD    result code
  2890.         (ret) 4F4Bh ("OK") if successful, else unchanged
  2891.  05h  5 BYTEs    padding
  2892. --------d-214405-----------------------------
  2893. INT 21 U - xDISK v3.31 - ???
  2894.     AX = 4405h
  2895.     BL = drive number (00h = default, 01h = A:, etc)
  2896.     CX = number of bytes to write
  2897.     DS:DX -> buffer containing version string
  2898.     ???
  2899. Return: CF clear if successful
  2900.         AX = number of bytes actually transferred
  2901.     CF set on error
  2902.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2903. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  2904. SeeAlso: AX=4404h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  2905. --------d-214405-----------------------------
  2906. INT 21 - COMBI-disk v1.13 - CONTROL COMBI-disk
  2907.     AX = 4405h
  2908.     BL = drive number (00h = default, 01h = A:, etc) for RAM disk
  2909.     CX = number of bytes to write
  2910.     DS:DX -> buffer containing command packet (see #1192)
  2911. Return: CF clear if successful
  2912.         AX = number of bytes actually transferred
  2913.     CF set on error
  2914.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2915. SeeAlso: AX=4404h"COMBI"
  2916.  
  2917. (Table 1191)
  2918. Values for COMBI-disk command code:
  2919.  80h    flush cache
  2920.  81h    change options byte
  2921.  82h    shrink memory
  2922.  83h    expand memory
  2923.  84h    get dirty block information
  2924.  85h    reset write errors
  2925.  86h    reset counters
  2926.  
  2927. Format of COMBI-disk command packet:
  2928. Offset    Size    Description    (Table 1192)
  2929.  00h    WORD    version
  2930.  02h    BYTE    command code (see #1191)
  2931. ---command code 80h---
  2932.  no additional fields
  2933. ---command code 81h---
  2934.  03h    BYTE    new options byte (see #1193)
  2935. ---command code 82h---
  2936.  03h    WORD    number of KB to release
  2937. ---command code 83h---
  2938.  03h    WORD    number of KB to expand
  2939. ---command code 84h---
  2940.  03h    DWORD    -> buffer for block info (see #1194)
  2941. ---command code 85h---
  2942.  03h    DWORD    block ID
  2943. ---command code 86h---
  2944.  03h    BYTE    which counters to reset
  2945.         bit 0: hard disk read counts
  2946.         bit 1: hard disk write counts
  2947.         bit 2: RAM disk read/write counts
  2948. Note:    multiple commands may be placed in a single packet by stringing
  2949.       together as many command/argument pairs as desired
  2950.  
  2951. Bitfields for COMBI-disk options byte:
  2952. Bit(s)    Description    (Table 1193)
  2953.  0    cache off
  2954.  1    cache frozen
  2955.  2    write caching enabled
  2956.  3    delayed writing disabled
  2957.  5    fix memory allocation (no XMS lending)
  2958.  6    no 'sector not found' error
  2959.  
  2960. Format of COMBI-disk block info:
  2961. Offset    Size    Description    (Table 1194)
  2962.  00h    DWORD    block ID
  2963.  04h    BYTE    bitmask of valid sectors in block
  2964.  05h    BYTE    bitmask of dirty sectors in block
  2965.  06h    BYTE    last error returned by BIOS
  2966.  07h    BYTE    number of errors
  2967. --------D-214405-----------------------------
  2968. INT 21 - SFS v1.00 - DRIVER CONTROL
  2969.     AX = 4405h
  2970.     BL = drive number (00h = default, 01h = A:, etc)
  2971.     CX = number of bytes to write
  2972.     DS:DX -> data to write (see #1196)
  2973. Return: CF clear if successful
  2974.         AX = number of bytes actually written
  2975.     CF set on error
  2976.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  2977. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  2978.       Peter C. Gutmann
  2979. SeeAlso: AX=4404h"SFS"
  2980.  
  2981. (Table 1195)
  2982. Values for SFS control function:
  2983.  00h    "PACKET_SET_DISKINFO"     set disk parameters
  2984.  01h    "PACKET_SET_KEYINFO"     set keying information
  2985.  02h    "PACKET_SET_READONLY"     select read/write or read-only
  2986.  03h    "PACKET_SET_DRIVENO"     set drive number to mount
  2987.  04h    "PACKET_SET_MOUNTSTATUS" set mount status
  2988.  05h    "PACKET_SET_UNMOUNT"     set/clear quick-unmount hotkey
  2989.  06h    "PACKET_SET_TIMEOUT"     set/clear auto-unmount timeout
  2990.  
  2991. Format of SFS control data packet:
  2992. Offset    Size    Description    (Table 1196)
  2993.  00h    WORD    signature 4330h ('C0')
  2994.  02h    WORD    function (see #1195)
  2995. ---function 00h---
  2996.  04h    WORD    sector size in bytes
  2997.  06h    BYTE    sectors per cluster
  2998.  07h    WORD    number of boot sectors
  2999.  09h    BYTE    number of copies of FAT
  3000.  0Ah    WORD    size of root directory in entries
  3001.  0Ch    WORD    number of sectors on disk, 16-bit
  3002.  0Eh    BYTE    media descriptor byte
  3003.  0Fh    WORD    sectors per FAT
  3004.  11h    WORD    sectors per track
  3005.  13h    WORD    number of heads
  3006.  15h    DWORD    number of hidden sectors
  3007.  19h    DWORD    number of sectors on disk, 32-bit
  3008. ---function 01h---
  3009.  04h 20 BYTEs    master IV for encrypted disk
  3010.  18h 64 BYTEs    NDC/SHS keying information
  3011. ---function 02h---
  3012.  04h    WORD    read-only state: 00h read-only, 01h read/write
  3013. ---function 03h---
  3014.  04h    WORD    drive number (see #1197)
  3015.  06h    DWORD    sector offset of logical volume from start of physical volume
  3016.         0 if logical volume = physical volume
  3017. ---function 04h---
  3018.  04h    WORD    mount status (00h unmounted, 01h mounted)
  3019. ---function 05h---
  3020.  04h    WORD    hotkey (high byte = shift state, low byte = scan code or 00h)
  3021.         (see #0005)
  3022.         0000h to disable hotkey
  3023. ---function 06h---
  3024.  04h    WORD    timeout in minutes before automatic unmount
  3025.         0000h to disable auto-unmount
  3026. Notes:    the data for function 00h corresponds to a DOS BPB (see AH=53h)
  3027.     functions 00h, 01h, and 03h automatically unmount the encrypted drive
  3028.     unmounting a drive with function 04h also destroys the encryption
  3029.       information in the driver and forces all dirty buffers to be flushed
  3030.  
  3031. Bitfields for SFS drive number:
  3032. Bit(s)    Description    (Table 1197)
  3033.  15-12    drive access mode
  3034.     0000 BIOS access
  3035.     0001 direct IDE access
  3036.     0010 direct SCSI access
  3037. ---if BIOS access---
  3038.  11-8    unused (0)
  3039.  7-0    BIOS drive number
  3040. ---if IDE access---
  3041.  11-8    unused (0)
  3042.  7-0    IDE drive number
  3043. ---if SCSI access---
  3044.  11-8    SCSI host number
  3045.  7-4    SCSI target ID
  3046.  3-0    SCSI logical unit number
  3047. --------D-214406-----------------------------
  3048. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  3049.     AX = 4406h
  3050.     BX = file handle
  3051. Return: CF clear if successful
  3052.         AL = input status
  3053.         00h not ready (device) or at EOF (file)
  3054.         FFh ready
  3055.         AH may be destroyed (refer to note)
  3056.     CF set on error
  3057.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  3058. Notes:    files may not register as being at EOF if positioned there by AH=42h
  3059.     under DOS 5.0, on a successful return, AH contains either the next
  3060.       character which will be read or 1Ah if at EOF; under a Windows95
  3061.       DOS box, AH seems to be either unchanged or 00h
  3062. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  3063. --------D-214407-----------------------------
  3064. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  3065.     AX = 4407h
  3066.     BX = file handle
  3067. Return: CF clear if successful
  3068.         AL = input status
  3069.         00h not ready
  3070.         FFh ready
  3071.     CF set on error
  3072.         AX = error code (01h,05h,06h,0Dh) (see #1332 at AH=59h/BX=0000h)
  3073. Note:    for DOS 2+, files are always ready for output, even if the disk is
  3074.       full or no media is in the drive
  3075. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  3076. --------D-214408-----------------------------
  3077. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  3078.     AX = 4408h
  3079.     BL = drive number (00h = default, 01h = A:, etc)
  3080. Return: CF clear if successful
  3081.         AX = media type (0000h removable, 0001h fixed)
  3082.     CF set on error
  3083.         AX = error code (01h,0Fh) (see #1332 at AH=59h/BX=0000h)
  3084. Note:    in addition to the normal operation, if Stacker is installed, this
  3085.       call also sets the volume number at offset 58h in the Stacker
  3086.       device driver (except under DR DOS 3.41-5.0, which do not pass
  3087.       through this call to the driver; use AX=440Eh instead)
  3088.       (see AX=4404h"Stacker",AX=440Eh,INT 25/AX=CDCDh)
  3089. SeeAlso: AX=4400h,AX=4404h"Stacker",AX=4409h,INT 2F/AX=122Bh
  3090. --------D-214409-----------------------------
  3091. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  3092.     AX = 4409h
  3093.     BL = drive number (00h = default, 01h = A:, etc)
  3094. Return: CF clear if successful
  3095.         DX = device attribute word
  3096.         bit 15: drive is SUBSTituted
  3097.         bit 12: drive is remote
  3098.         bit  9: direct I/O not allowed
  3099.     CF set on error
  3100.         AX = error code (01h,0Fh) (see #1332 at AH=59h/BX=0000h)
  3101. Note:    on local drives, DX bits not listed above are the attribute word from
  3102.       the device driver header (see #1298 at AH=52h); for remote drives,
  3103.       the other bits appear to be undefined for DOS versions prior to 5.0
  3104.       (they are all cleared in DOS 5+)
  3105.     checking whether DX=0800h on return appears to be a fairly reliable
  3106.       method for detecting Microsoft's RAMDRIVE, though not for other
  3107.       ramdisks (there appears to be no simple yet foolproof method for
  3108.       detecting ramdisks, although the presence of only a single copy of
  3109.       the FAT and only a single head on non-removable devices is a fairly
  3110.       good indicator)
  3111. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  3112. --------D-21440A-----------------------------
  3113. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  3114.     AX = 440Ah
  3115.     BX = handle
  3116. Return: CF clear if successful
  3117.         DX = attribute word (as stored in SFT)
  3118.         bit 15: set if remote
  3119.         bit 14: date/time not set on close
  3120.     CF set on error
  3121.         AX = error code (01h,06h) (see #1332 at AH=59h/BX=0000h)
  3122. Notes:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  3123.       the file server on which the handle is located in CX
  3124.     DR DOS 3.41 and 5.0 clear all bits of DX except bit 15
  3125. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  3126. --------D-21440B-----------------------------
  3127. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  3128.     AX = 440Bh
  3129.     CX = pause between retries (default 1)
  3130.     DX = number of retries (default 3)
  3131. Return: CF clear if successful
  3132.     CF set on error
  3133.         AX = error code (01h) (see #1332 at AH=59h/BX=0000h)
  3134. Notes:    delay is dependent on processor speed (value in CX specifies number of
  3135.       64K-iteration empty loops to execute)
  3136.     if DX=0000h on entry, the retry count is left unchanged
  3137. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  3138. --------D-21440C-----------------------------
  3139. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  3140.     AX = 440Ch
  3141.     BX = device handle
  3142.     CH = category code (see #1198)
  3143.     CL = function number (see #1199)
  3144.     DS:DX -> parameter block (see #1200,#1201,#1202,#1203,#1204,#1205)
  3145.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  3146.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  3147. Return: CF set on error
  3148.         AX = error code (see #1332 at AH=59h/BX=0000h)
  3149.     CF clear if successful
  3150.         DS:DX -> iteration count if CL=65h
  3151.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  3152.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  3153. Note:    DR DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
  3154.       does not support a retry counter
  3155. SeeAlso: AX=440Dh"DOS 3.2+",INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  3156. SeeAlso: INT 2F/AX=1A01h
  3157.  
  3158. (Table 1198)
  3159. Values for IOCTL category code:
  3160.  00h    unknown (DOS 3.3+)
  3161.  01h    COMn: (DOS 3.3+)
  3162.  03h    CON (DOS 3.3+)
  3163.  05h    LPTn:
  3164.  9Eh    Media Access Control driver (STARLITE)
  3165.  00h-7Fh reserved for Microsoft
  3166.  80h-FFh reserved for OEM/user-defined
  3167.  
  3168. (Table 1199)
  3169. Values for generic character IOCTL function:
  3170.  00h    MAC driver Bind (STARLITE) (see #1200)
  3171.  45h    set iteration (retry) count (see #1201)
  3172.  4Ah    select code page (see #1202)
  3173.  4Ch    start code-page preparation (see #1203)
  3174.  4Dh    end code-page preparation (see #1204)
  3175.  5Fh    set display information (DOS 4.0+) (see #1205)
  3176.  65h    get iteration (retry) count
  3177.  6Ah    query selected code page (see #1202)
  3178.  6Bh    query prepare list (see #1206)
  3179.  7Fh    get display information (DOS 4.0+) (see #1205)
  3180. Note:    bit assignments for function code:
  3181.         bit 7: set to ignore if unsupported, clear to return error
  3182.         bit 6: set if passed to driver, clear if intercepted by DOS
  3183.         bit 5: set if queries data from device, clear if sends command
  3184.         bits 4-0: subfunction
  3185.  
  3186. Format of parameter block for function 00h:
  3187. Offset    Size    Description    (Table 1200)
  3188.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  3189.  08h    WORD    version
  3190.  0Ah    WORD    flags
  3191.         bit 0: media requires connect or listen request before use
  3192.         bit 1: network is a LAN (broadcast/multicast supported)
  3193.         bit 2: point-to-point network
  3194.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  3195.         by MAC driver)
  3196.  0Eh    WORD    context
  3197.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  3198.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  3199.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  3200.  16h    WORD    addressing format (filled in by MAC driver)
  3201.         0000h general addressing
  3202.         0001h Ethernet addressing
  3203.         0002h Token Ring addressing
  3204.         0003h Token Bus addressing
  3205.  18h    DWORD    Send entry point (filled in by MAC driver)
  3206.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  3207.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  3208.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  3209.  
  3210. Format of parameter block for function 45h:
  3211. Offset    Size    Description    (Table 1201)
  3212.  00h    WORD    number of times output is attempted before driver assumes
  3213.           device is busy
  3214.  
  3215. Format of parameter block for functions 4Ah and 6Ah:
  3216. Offset    Size    Description    (Table 1202)
  3217.  00h    WORD    length of data
  3218.  02h    WORD    code page ID (see #1411 at INT 21/AX=6602h)
  3219.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  3220.           start/end for each of N ranges (DOS 4.0)
  3221.     WORD    0000h  end of data (DOS 4.0)
  3222.  
  3223. Format of parameter block for function 4Ch:
  3224. Offset    Size    Description    (Table 1203)
  3225.  00h    WORD    flags
  3226.         DISPLAY.SYS = 0000h
  3227.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  3228.             prepare cartridge selection
  3229.  02h    WORD    length of remainder of parameter block
  3230.  04h    WORD    number of code pages following
  3231.  06h  N WORDs    code page 1,...,N
  3232.  
  3233. Format of parameter block for function 4Dh:
  3234. Offset    Size    Description    (Table 1204)
  3235.  00h    WORD    length of data
  3236.  02h    WORD    code page ID (see #1411 at INT 21/AX=6602h)
  3237.  
  3238. Format of parameter block for functions 5Fh and 7Fh:
  3239. Offset    Size    Description    (Table 1205)
  3240.  00h    BYTE    level (0 for DOS 4.x-6.0)
  3241.  01h    BYTE    reserved (0)
  3242.  02h    WORD    length of following data (14)
  3243.  04h    WORD    control flags
  3244.         bit 0 set for blink, clear for intensity
  3245.         bits 1-15 reserved
  3246.  06h    BYTE    mode type (1=text, 2=graphics)
  3247.  07h    BYTE    reserved (0)
  3248.  08h    WORD    colors
  3249.         0000h = monochrome
  3250.         else N bits per pixel
  3251.  0Ah    WORD    pixel columns
  3252.  0Ch    WORD    pixel rows
  3253.  0Eh    WORD    character columns
  3254.  10h    WORD    character rows
  3255.  
  3256. Format of parameter block for function 6Bh:
  3257. Offset    Size    Description    (Table 1206)
  3258.  00h    WORD    length of following data
  3259.  02h    WORD    number of hardware code pages
  3260.  04h  N WORDs    hardware code pages 1,...,N
  3261.     WORD    number of prepared code pages
  3262.       N WORDs    prepared code pages 1,...,N
  3263. --------d-21440C-----------------------------
  3264. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  3265.     AX = 440Ch
  3266.     BX = device handle
  3267.     CH = category code
  3268.         07h tape (ASPITAPE.SYS)
  3269.     CL = function
  3270.         01h "mtop" - perform tape operation
  3271.         02h "mtget" - get tape status
  3272.         03h ignore end-of-tape errors
  3273.         04h enable end-of-tape errors
  3274.     DS:DX -> parameter block (see #1207,#1208)
  3275. Return: CF set on error
  3276.         AX = error code (see #1332 at AH=59h/BX=0000h)
  3277.     CF clear if successful
  3278.         DS:DX -> data block
  3279. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  3280.       SCSI Programming Interface (ASPI).  It provides the following device
  3281.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  3282.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  3283.       also be the following names 'MTx' and 'NMTx' which default to 1024
  3284.       byte blocks.    The names may also have a '$' appended to try and make
  3285.       them unique from file names of 'RMT0' etc.
  3286.     once opend these devices must be put into RAW mode
  3287. SeeAlso: AX=4402h"ASPI"
  3288.  
  3289. Format of ASPITAPE.SYS mtop parameter block:
  3290. Offset    Size    Description    (Table 1207)
  3291.  00h    WORD    operation code
  3292.         00h "MTWEOF" - write an end-of-file record
  3293.         01h "MTFSF" - forward space file
  3294.         02h "MTBSF" - backward space file
  3295.         03h "MTFSR" - forward space record
  3296.         04h "MTBSR" - backward space record
  3297.         05h "MTREW" - rewind
  3298.         06h "MTOFFL" - rewind and unload
  3299.         07h "MTNOP" - perform TEST UNIT READY
  3300.  02h    DWORD    repetition count
  3301.  
  3302. Format of ASPITAPE.SYS mtget parameter block:
  3303. Offset    Size    Description    (Table 1208)
  3304.  00h    BYTE    ASPI host ID
  3305.  01h    BYTE    SCSI target ID
  3306.  02h    BYTE    SCSI logical unit number
  3307.  03h    BYTE    device parameters
  3308.         bit 0: drive must use fixed-block read and write
  3309.         bit 7: drive is an ASPI device
  3310.  04h    BYTE    current device state (see #1209)
  3311.  05h    BYTE    unit number within driver
  3312.  06h    WORD    fixed block blocksize
  3313.  08h    BYTE    last SCSI status
  3314.  09h    BYTE    last SCSI sense key
  3315.  0Ah    WORD    last SCSI opcode (packed) (see #1210)
  3316.  0Ch    WORD    residual bytes from SCSI opcode
  3317.  
  3318. Bitfields for ASPITAPE.SYS current device state:
  3319. Bit(s)    Description    (Table 1209)
  3320.  0    device currently opened in buffered mode
  3321.  1    drive currently opened in nonbuffered mode
  3322.  2    rewind drive on last close
  3323.  3    drive has been written on
  3324.  4    drive has been read from
  3325.  5    next read will return 0 bytes
  3326.  6    EOM will resemble EOF
  3327.  7    drive may be busy rewinding
  3328.  
  3329. Bitfields for SCSI opcode:
  3330. Bit(s)    Description    (Table 1210)
  3331.  0-7    SCSI operation (SCSI packet byte 0)
  3332.  8-10    SCSI flags (SCSI packet byte 1)
  3333.  11-12    ASPI "Direction Bits" (ASPI SRB byte 3)
  3334. --------D-21440D-----------------------------
  3335. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  3336.     AX = 440Dh
  3337.     BL = drive number (00h=default,01h=A:,etc)
  3338.     CH = category code (see #1211)
  3339.     CL = minor code (function) (see #1212)
  3340.     DS:DX -> (DOS) parameter block (see #1213,#1215,#1216,#1217,#1218)
  3341.     SI:DI -> (OS/2 comp box) parameter block (see #1219,#1221,#1222,#1225)
  3342. Return: CF set on error
  3343.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3344.     CF clear if successful
  3345.         DS:DX -> data block if CL=60h or CL=61h
  3346. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  3347.       entries in the BPB for diskettes.
  3348.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  3349.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  3350.     DR DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
  3351.       other minor codes return error code 16h
  3352.     some PCMCIA calls reportedly appear to be dangerous for MS-DOS versions
  3353.       prior to 5.0
  3354.     minor code 60h normally produces no I/O except with AutoMount=1 for
  3355.       DBLSPACE/DRVSPACE
  3356. SeeAlso: AX=440Ch,AX=440Dh/CX=084Ah,AX=440Dh/CX=0871h,AH=69h,INT 2F/AX=0802h
  3357. SeeAlso: INT 2F/AX=122Bh
  3358.  
  3359. (Table 1211)
  3360. Values for block device IOCTL category code:
  3361.  08h    disk drive
  3362.  48h    FAT32 disk drive
  3363.  00h-7Fh reserved for Microsoft
  3364.  80h-FFh reserved for OEM/user-defined
  3365.  
  3366. (Table 1212)
  3367. Values for generic block IOCTL minor code:
  3368.  00h    (OS/2)    \ used to lock/unlock a drive
  3369.  01h    (OS/2)    /
  3370.  40h    set device parameters (see #1213)
  3371.  41h    write logical device track (see #1215)
  3372.  42h    format and verify logical device track (see #1216)
  3373.  46h    (DOS 4.0+) set volume serial number (see #1218,AH=69h)
  3374.  47h    (DOS 4.0+) set access flag (see #1219)
  3375.  48h    (Enh. Disk Drive Spec) set media lock state (see #1220,INT 13/AH=45h)
  3376.  49h    (Enh. Disk Drive Spec) eject media in drive (see INT 13/AH=49h)
  3377.     no parameter block required
  3378.  4Ah    (MS-DOS 7.0) lock logical volume (see AX=440Dh/CX=084Ah)
  3379.  4Bh    (MS-DOS 7.0) lock physical volume (see AX=440Dh/CX=084Bh)
  3380.  50h    (PCMCIA) attribute memory write
  3381.  51h    (PCMCIA) common memory write
  3382.  52h    (PCMCIA) force media change (DOS 5+ ???) (see #1221)
  3383.  53h    (PCMCIA) erase drive
  3384.  54h    (PCMCIA) erase media
  3385.  56h    (PCMCIA) set erase status callback
  3386.  57h    (PCMCIA) append Card Information Structure (CIS) tuple
  3387.  58h    (PCMCIA) erase CIS tuples
  3388.  60h    get device parameters (see #1213)
  3389.  61h    read logical device track (see #1215)
  3390.  62h    verify logical device track (see #1217)
  3391.  66h    (DOS 4.0+) get volume serial number (see #1218,AH=69h)
  3392.  67h    (DOS 4.0+) get access flag (see #1219)
  3393.  68h    (DOS 5.0+) sense media type (see #1222)
  3394.  6Ah    (MS-DOS 7.0) unlock logical volume (see AX=440Dh/CX=086Ah)
  3395.     no parameter block required
  3396.  6Bh    (MS-DOS 7.0) unlock physical volume (see AX=440Dh/CX=086Bh)
  3397.     no parameter block required
  3398.  6Ch    (MS-DOS 7.0) get lock flag (see AX=440Dh/CX=086Ch)
  3399.     no parameter block required
  3400.  6Dh    (MS-DOS 7.0) enumerate open files (see AX=440Dh/CX=086Dh)
  3401.  6Eh    (MS-DOS 7.0) find swap file (see AX=440Dh/CX=086Eh)
  3402.  6Fh    (MS-DOS 7.0) get drive map information (see #1223)
  3403.  70h    (PCMCIA) attribute memory read
  3404.  70h    (MS-DOS 7.0) get current lock state (see AX=440Dh/CX=0870h)
  3405.     no parameter block required
  3406.  71h    (MS-DOS 7.0) get first cluster (see AX=440Dh/CX=0871h)
  3407.  73h    (PCMCIA) get memory media information (DOS 5+ ???) (see #1225)
  3408.  76h    (PCMCIA) get erase status callback
  3409.  77h    (PCMCIA) get first Card Information Structure (CIS) tuple
  3410.  78h    (PCMCIA) get next CIS tuple
  3411.  7Fh    (PCMCIA) get ??? information (see #1226,#1227)
  3412.  
  3413. Format of parameter block for functions 40h, 60h:
  3414. Offset    Size    Description    (Table 1213)
  3415.  00h    BYTE    special functions
  3416.         bit 0 set if function to use current BPB, clear if Device
  3417.               BIOS Parameter Block field contains new default BPB
  3418.         bit 1 set if function to use track layout fields only
  3419.             must be clear if CL=60h
  3420.         bit 2 set if all sectors in track same size (should be set)
  3421.         bits 3-7 reserved (MS-DOS, Novell DOS 7)
  3422.         bit 5: skip head settling time (WinDOS 2.11)
  3423.         bit 6: format access flag (WinDOS 2.11)
  3424.  01h    BYTE    device type (see #1214)
  3425.  02h    WORD    device attributes
  3426.         bit 0 set if nonremovable medium
  3427.         bit 1 set if door lock ("changeline") supported
  3428.         bits 2-15 reserved
  3429.  04h    WORD    number of cylinders
  3430.  06h    BYTE    media type
  3431.         for 1.2M drive
  3432.             00h 1.2M disk (default)
  3433.             01h 320K/360K disk
  3434.         F8h for DUBLDISK.SYS v2.6 expanded drives
  3435.         always 00h for other drive types
  3436.  07h 31 BYTEs    device BPB (see #1315 at AH=53h), bytes after BPB offset 1Eh
  3437.           omitted; final six bytes only transferred on function 40h
  3438.           with BYTE 00h bit 0 set for MS-DOS 5.0
  3439. ---function 40h only---
  3440.  26h    WORD    number of sectors per track (start of track layout field)
  3441.         (maximum 63)
  3442.  28h  N word pairs: number,size of each sector in track
  3443. ---category code 48h (FAT32), function 40h---
  3444.  07h 53 BYTEs    extended BPB (see #1316)
  3445.  3Ch 32 BYTEs    reserved
  3446.  5Ch    WORD    number of track table entries
  3447.  5Eh 2N WORDs    sector table (word pairs: number/size of each sector in track)
  3448. ---category code 48h (FAT32), function 60h---
  3449.  07h 53 BYTEs    extended BPB (see #1316)
  3450.  3Ch 32 BYTEs    reserved
  3451.  
  3452. (Table 1214)
  3453. Values for device type:
  3454.  00h    320K/360K disk
  3455.  01h    1.2M disk
  3456.  02h    720K disk
  3457.  03h    single-density 8-inch disk
  3458.  04h    double-density 8-inch disk
  3459.  05h    fixed disk
  3460.  06h    tape drive
  3461.  07h    (DOS 3.3+) other type of block device, normally 1.44M floppy
  3462.  08h    read/write optical disk
  3463.  09h    (DOS 5+) 2.88M floppy
  3464.  
  3465. Format of parameter block for functions 41h, 61h:
  3466. Offset    Size    Description    (Table 1215)
  3467.  00h    BYTE    special functions (reserved, must be zero)
  3468.  01h    WORD    number of disk head
  3469.  03h    WORD    number of disk cylinder
  3470.  05h    WORD    number of first sector to read/write
  3471.  07h    WORD    number of sectors
  3472.  09h    DWORD    transfer address
  3473. Note:    under Windows95, a volume must be locked (see AX=440Dh/CX=084Bh) in
  3474.       order to perform direct accesses such as track reads and writes
  3475.       with this IOCTL function
  3476.  
  3477. Format of parameter block for function 42h:
  3478. Offset    Size    Description    (Table 1216)
  3479.  00h    BYTE    reserved, must be zero (DOS <3.2)
  3480.           bit 0=0: format/verify track
  3481.             1: format status call (DOS 3.2+), don't actually format
  3482.           bit 1: format multiple tracks, require additional WORD
  3483.               (hard disks only)
  3484.           bits 2-7 reserved, must be zero
  3485.         value on return (DOS 3.3+):
  3486.           00h    specified tracks, sectors/track supported by BIOS
  3487.           01h    function not supported by BIOS
  3488.           02h    specified tracks, sectors/track not allowed for drive
  3489.           03h    no disk in drive
  3490.  01h    WORD    number of disk head
  3491.  03h    WORD    number of disk cylinder
  3492. ---BYTE 00h bit 1 set---
  3493.  05h    WORD    number of tracks to format
  3494.  
  3495. Format of parameter block for function 62h:
  3496. Offset    Size    Description    (Table 1217)
  3497.  00h    BYTE    reserved, must be zero (DOS <3.2)
  3498.           bit 0=0: verify single track
  3499.             1: verify multiple tracks
  3500.           bits 1-7 reserved, must be zero
  3501.         value on return (DOS 3.3+):
  3502.           00h    specified tracks, sectors/track supported by BIOS
  3503.           01h    function not supported by BIOS
  3504.           02h    specified tracks, sectors/track not allowed for drive
  3505.           03h    no disk in drive
  3506.  01h    WORD    number of disk head
  3507.  03h    WORD    number of disk cylinder
  3508.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  3509.  
  3510. Format of parameter block for functions 46h, 66h:
  3511. Offset    Size    Description    (Table 1218)
  3512.  00h    WORD    (call) info level (should be 0000h)
  3513.  02h    DWORD    disk serial number (binary)
  3514.  06h 11 BYTEs    volume label or "NO NAME    "
  3515.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   "
  3516.           (generally CL=66h only, but MS-DOS 5.0 will write the
  3517.           given filesystem type to the disk)
  3518.  
  3519. Format of parameter block for functions 47h, 67h:
  3520. Offset    Size    Description    (Table 1219)
  3521.  00h    BYTE    special-function field (must be zero)
  3522.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  3523.  
  3524. Format of parameter block for function 48h:
  3525. Offset    Size    Description    (Table 1220)
  3526.  00h    BYTE    (call) locking operation
  3527.         00h lock media in drive
  3528.         01h unlock media
  3529.         02h get locking status
  3530.  01h    BYTE    (ret) drive's lock status (number of pending locks on drive)
  3531. Note:    also supported by MS-DOS 7.0
  3532.  
  3533. Format of parameter block for function 52h:
  3534.  00h    BYTE    (call) unused???    (Table 1221)
  3535.         (ret) 00h if flash/ATA drive but no card inserted
  3536.             unchanged otherwise
  3537. Notes:    the absense of a flash card should be tested by checking the DOS error
  3538.       code rather than the returned byte
  3539.     the parameter byte is cleared to 00h erroneously by the Award
  3540.       PCDISK.EXE v1.02c PCMCIA/ATA driver if no ATA card is inserted
  3541.       (bug corrected in PCDISK.EXE v1.02h and later)
  3542.     not supported by the SystemSoft ATADRV.EXE and the Phoenix PCMATA.SYS
  3543.       PCMCIA/ATA drivers
  3544.  
  3545. Format of parameter block for function 68h:
  3546. Offset    Size    Description    (Table 1222)
  3547.  00h    BYTE    01h for default media type, 00h for any other media type
  3548.         (see also INT 13/AH=20h"Compaq")
  3549.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  3550.  
  3551. Format of parameter block for function 6Fh:
  3552. Offset    Size    Description    (Table 1223)
  3553.  00h    BYTE    (call) length of this buffer (in bytes)
  3554.  01h    BYTE    (ret) number of bytes in parameter block actually used
  3555.  02h    BYTE    (ret) drive flags (see #1224)
  3556.  03h    BYTE    (ret) physical drive number
  3557.         00h-7Fh floppy
  3558.         80h-FEh hard
  3559.         FFh no physical drive
  3560.  04h    DWORD    (ret) bitmap of logical drives associated with physical drive
  3561.         bit 0 = drive A:, etc.
  3562.  08h    QWORD    (ret) relative block address of partition start
  3563.  
  3564. Bitfields for Get Drive Map Information drive flags:
  3565. Bit(s)    Description    (Table 1224)
  3566.  0    protected-mode driver for logical drive
  3567.  1    protected-mode driver in use for physical drive corresponding to the
  3568.       logical drive
  3569.  2    drive available only in protected mode
  3570.  3    protected-mode drive supports media ejection
  3571.  4    drive issues media insertion and removal notifications
  3572. SeeAlso: #1223
  3573.  
  3574. Format of parameter block for function 73h:
  3575. Offset    Size    Description    (Table 1225)
  3576.  00h    BYTE    ???
  3577.         00h ATA card inserted ???
  3578.         80h ATA card not inserted ???
  3579.  01h    BYTE    length of parameter block ???
  3580.         apparently always 40h
  3581.  02h    BYTE    ???
  3582.         00h ATA card not inserted ???
  3583.         0Dh ATA card inserted ???
  3584.  03h  2 BYTEs    ??? (apparently always 00h)
  3585.  05h    BYTE    drive number (0=first) ???
  3586.  06h    BYTE    total number of drives ???
  3587.  07h    BYTE    ???
  3588.         00h ATA card not inserted ???
  3589.         01h ATA card inserted ???
  3590.  08h 17 BYTEs    ???
  3591.  19h    BYTE    ???
  3592.         00h ATA card not inserted ???
  3593.         01h ATA card inserted ???
  3594.  1Ah    BYTE    ??? (apparently always 01h)
  3595.  1Bh    BYTE    ???
  3596.         00h ATA card not inserted ???
  3597.         01h ATA card inserted ???
  3598.  1Ch  2 BYTEs    ??? (apparently always 0015h)
  3599.  1Eh  2 BYTEs    ???
  3600.  20h  2 BYTEs    ??? (apparently always 0110h)
  3601.  22h 15 BYTEs    ???
  3602.  31h  2 BYTEs    ??? (apparently always 7000h)
  3603.  33h 11 BYTEs    driver signature
  3604.         "AWARD PDISK" for Award PCDISK.EXE PCMCIA/ATA driver
  3605.         "MS-BIOS    " for HP 200LX generic ATA driver
  3606.  3Eh  2 BYTEs    ???
  3607. Notes:    parameter structure possibly depends on driver
  3608.     this function is not supported by the SystemSoft ATADRV.EXE and the
  3609.       Phoenix PCMATA.SYS PCMCIA/ATA drivers
  3610.  
  3611. Format of parameter block for function 7Fh for SystemSoft ATADRV.EXE:
  3612. Offset    Size    Description    (Table 1226)
  3613.  00h    DWORD    -> unknown location within driver
  3614. Note:    function supported by the SystemSoft ATADRV.EXE PCMCIA/ATA driver
  3615.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  3616. SeeAlso: #1227
  3617.  
  3618. Format of parameter block for function 7Fh for Phoenix PCMATA.SYS:
  3619. Offset    Size    Description    (Table 1227)
  3620.  00h  8 BYTEs    ???
  3621. Note:    this function supported by the Phoenix PCMATA.SYS PCMCIA/ATA driver
  3622.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  3623. SeeAlso: #1226
  3624. --------D-21440DCX084A-----------------------
  3625. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK LOGICAL VOLUME
  3626.     AX = 440Dh
  3627.     CX = 084Ah (category code 08h, minor code 4Ah)
  3628.     BL = drive number (00h=default,01h=A:,etc)
  3629.     BH = lock level (00h-03h)
  3630.     DX = drive permissions (see #1228) for Level 1 lock or second
  3631.         Level 0 lock when formatting
  3632. Return: CF set on error
  3633.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3634.     CF clear if successful
  3635. Note:    the logical volume must be locked before direct disk accesses are
  3636.       permitted by Windows95
  3637. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  3638. SeeAlso: AX=440Dh/CX=086Ch
  3639.  
  3640. Bitfields for drive permissions:
  3641. Bit(s)    Description    (Table 1228)
  3642.  0    allow writes
  3643.  1    disallow new file mappings
  3644.  2    volume locked for formatting
  3645. --------D-21440DCX084B-----------------------
  3646. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK PHYSICAL VOLUME
  3647.     AX = 440Dh
  3648.     CX = 084Bh (category code 08h, minor code 4Bh)
  3649.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  3650.     BH = lock level (00h-03h)
  3651.     DX = drive permissions (see #1228) for Level 1 lock or second
  3652.         Level 0 lock when formatting
  3653. Return: CF set on error
  3654.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3655.     CF clear if successful
  3656. Note:    the physical volume must be locked before direct disk writes via
  3657.       INT 13 are permitted by Windows95
  3658. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  3659. SeeAlso: AX=440Dh/CX=086Ch
  3660. --------D-21440DCX086A-----------------------
  3661. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
  3662.     AX = 440Dh
  3663.     CX = 086Ah (category code 08h, minor code 6Ah)
  3664.     BL = drive number (00h=default,01h=A:,etc)
  3665. Return: CF set on error
  3666.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3667.     CF clear if successful
  3668. Note:    the logical volume must be locked before direct disk accesses via
  3669.       INT 13 are permitted by Windows95
  3670. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  3671. --------D-21440DCX086B-----------------------
  3672. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
  3673.     AX = 440Dh
  3674.     CX = 086Bh (category code 08h, minor code 6Bh)
  3675.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  3676. Return: CF set on error
  3677.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3678.     CF clear if successful
  3679. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  3680. --------D-21440DCX086C-----------------------
  3681. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET LOCK FLAG STATE
  3682.     AX = 440Dh
  3683.     CX = 086Ch (category code 08h, minor code 6Ch)
  3684.     BL = drive number (00h=default,01h=A:,etc)
  3685. Return: CF set on error
  3686.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3687.     CF clear if successful
  3688.         AX = access flag (see #1229)
  3689. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=084Bh
  3690. SeeAlso: AX=440Dh/CX=0870h
  3691.  
  3692. (Table 1229)
  3693. Values for drive access flag:
  3694.  0000h    no writes/file mappings since last call
  3695.  0001h    write operation has occurred since last call
  3696.  0002h    file mapping has occurred since last call
  3697. Note:    function 6Ch resets the access flag every time it is called
  3698. --------D-21440DCX086D-----------------------
  3699. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - ENUMERATE OPEN FILES
  3700.     AX = 440Dh
  3701.     CX = 086Dh (category code 08h, minor code 6Dh)
  3702.     BL = drive number (00h=default,01h=A:,etc)
  3703.     DS:DX -> buffer for ASCIZ pathname
  3704.     SI = file index (0000h to number of open files-1)
  3705.     DI = enumeration type (0000h all files, 0001h unmovable files)
  3706. Return: CF set on error
  3707.         AX = error code (01h,02h,12h,etc.) (see #1332 at AH=59h/BX=0000h)
  3708.         0012h if file index is out of range
  3709.     CF clear if successful
  3710.         AX = file open mode (BX from AX=6C00h or AX=716Ch)
  3711.         CX = file type (see #1230)
  3712. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Ch
  3713. SeeAlso: AX=440Dh/CX=086Eh,AX=6C00h,AX=716Ch
  3714.  
  3715. (Table 1230)
  3716. Values for file type:
  3717.  0000h    normal file
  3718.  0001h    memory-mapped file (unmovable)
  3719.  0002h    unmovable file
  3720.  0004h    swap file
  3721. --------D-21440DCX086E-----------------------
  3722. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - FIND SWAP FILE
  3723.     AX = 440Dh
  3724.     CX = 086Eh (category code 08h, minor code 6Eh)
  3725.     BL = drive number (00h=default,01h=A:,etc)
  3726.     DS:DX -> buffer for ASCIZ pathname
  3727.     SI = file index
  3728.     DI = enumeration type
  3729. Return: CF set on error
  3730.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3731.     CF clear if successful
  3732.         AX = pager type
  3733.         0001h no pager
  3734.         0002h paging through MS-DOS
  3735.         0003h protected-mode pager
  3736.         CX:BX = swap file size in 4K pages
  3737. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Dh
  3738. --------D-21440DCX0870-----------------------
  3739. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET CURRENT LOCK STATE
  3740.     AX = 440Dh
  3741.     CX = 0870h (category code 08h, minor code 70h)
  3742.     BL = drive number (00h=default,01h=A:,etc)
  3743. Return: CF set on error
  3744.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3745.     CF clear if successful
  3746.         AX = current lock level (0-3) or FFFFh if not locked
  3747.         CX = lock permissions if AX<>FFFFh (see #1228)
  3748. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch
  3749. --------D-21440DCX0871-----------------------
  3750. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET FIRST CLUSTER
  3751.     AX = 440Dh
  3752.     CX = 0871h (category code 08h, minor code 71h)
  3753.     BX = filename character set (see #1231)
  3754.     DS:DX -> ASCIZ pathname for file or directory
  3755. Return: CF set on error
  3756.         AX = error code (01h,02h,etc.) (see #1332 at AH=59h/BX=0000h)
  3757.     CF clear if successful
  3758.         DX:AX = first cluster number
  3759. Note:    this function finds any file or directory regardless of attributes,
  3760.       except that it will not find volume labels
  3761. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch,#1007
  3762.  
  3763. (Table 1231)
  3764. Values for character set:
  3765.  00h    Windows ANSI
  3766.  01h    current OEM character set
  3767.  02h    Unicode
  3768. --------D-21440E-----------------------------
  3769. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  3770.     AX = 440Eh
  3771.     BL = drive number (00h=default,01h=A:,etc)
  3772. Return: CF set on error
  3773.         AX = error code (01h,0Fh) (see #1332 at AH=59h/BX=0000h)
  3774.     CF clear if successful
  3775.         AL = 00h block device has only one logical drive assigned
  3776.          1..26 the last letter used to reference the drive (1=A:,etc)
  3777. Notes:    DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  3778.       always returns AL=00h
  3779.     in addition to the normal operation, if Stacker is installed, this
  3780.       call also sets the volume number at offset 58h in the Stacker
  3781.       device driver (DR DOS 3.41-5.0 only; use AX=4408h otherwise)
  3782.       (see AX=4404h"Stacker",INT 25/AX=CDCDh)
  3783. SeeAlso: AX=4408h,AX=440Fh,INT 2F/AX=122Bh
  3784. --------D-21440F-----------------------------
  3785. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  3786.     AX = 440Fh
  3787.     BL = physical drive number (00h=default,01h=A:,etc))
  3788. Return: CF set on error
  3789.         AX = error code (01h,0Fh) (see #1332 at AH=59h/BX=0000h)
  3790.     CF clear if successful
  3791.         drive now responds to next logical drive number
  3792. Notes:    maps logical drives to physical drives, similar to DOS's treatment of
  3793.       a single physical floppy drive as both A: and B:
  3794.     DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  3795.       always returns an error on this function
  3796. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  3797. --------D-214410-----------------------------
  3798. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  3799.     AX = 4410h
  3800.     BX = handle for device
  3801.     CH = category code (see #1198)
  3802.     CL = function code (see #1199)
  3803. Return: CF clear if successful
  3804.         AX = 0000h    specified IOCTL function is supported
  3805.     CF set on error
  3806.         AL = 01h    IOCTL capability not available
  3807. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  3808.       standard DOS 3.2 set may use this call first to see whether a
  3809.       particular call is supported
  3810. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4411h
  3811. --------d-214410BXFFFF-----------------------
  3812. INT 21 U - NewSpace - ENABLE DRIVER
  3813.     AX = 4410h
  3814.     BX = FFFFh
  3815. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  3816.       all files as they are written and decompresses them as they are read
  3817. Note:    compressed files are not accessible unless the driver is enabled
  3818. SeeAlso: AX=4411h/BX=FFFFh
  3819. --------D-214411-----------------------------
  3820. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  3821.     AX = 4411h
  3822.     BL = drive number
  3823.     CH = category code (see #1211)
  3824.     CL = function code (see #1212)
  3825. Return: CF clear if successful
  3826.         AX = 0000h    specified IOCTL function is supported
  3827.     CF set on error
  3828.         AL = 01h    IOCTL capability not available
  3829. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  3830.       standard DOS 3.2 set may use this call first to see whether a
  3831.       particular call is supported
  3832. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4410h
  3833. --------d-214411BXFFFF-----------------------
  3834. INT 21 U - NewSpace - DISABLE DRIVER
  3835.     AX = 4411h
  3836.     BX = FFFFh
  3837. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  3838.       all files as they are written and decompresses them as they are read
  3839. Note:    compressed files are not accessible unless the driver is enabled
  3840. SeeAlso: AX=4410h/BX=FFFFh
  3841. --------O-214412-----------------------------
  3842. INT 21 O - DR DOS 5.0-6.0 - DETERMINE DOS TYPE
  3843.     AX = 4412h
  3844.     CF set
  3845. Return: CF set if not DR DOS
  3846.         AX = error code (see #1332 at AH=59h/BX=0000h)
  3847.     CF clear if DR DOS
  3848.         DX = AX = version code (see #1233)
  3849. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  3850.       identical to AX=4452h
  3851. SeeAlso: AX=4452h
  3852. --------d-214412BXFFFF-----------------------
  3853. INT 21 U - NewSpace - INSTALLATION CHECK???
  3854.     AX = 4412h
  3855.     BX = FFFFh
  3856. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  3857.     BX:DX -> ???
  3858.     CX = ???
  3859. SeeAlso: AX=4411h/BX=FFFFh
  3860. --------d-214413BXFFFF-----------------------
  3861. INT 21 U - NewSpace - GET ???
  3862.     AX = 4413h
  3863.     BX = FFFFh
  3864. Return: AX = code segment of NewRes (resident driver for NewSpace)
  3865.     BX = offset of ???
  3866. SeeAlso: AX=4412h/BX=FFFFh
  3867. --------O-214414-----------------------------
  3868. INT 21 OU - DR DOS 5.0-6.0 - SET GLOBAL PASSWORD
  3869.     AX = 4414h
  3870.     DS:DX -> password string (blank-padded to 8 characters)
  3871. Desc:    Specify the master password for accessing files.
  3872. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  3873.       identical to AX=4454h
  3874. SeeAlso: AX=4454h
  3875. --------d-214414BXFFFF-----------------------
  3876. INT 21 U - NewSpace - DEBUGGING DUMP
  3877.     AX = 4414h
  3878.     BX = FFFFh
  3879. Return: debugging dump written to X:\NEWSPACE.SMP
  3880. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  3881. --------O-2144-------------------------------
  3882. INT 21 OU - DR DOS 5.0-6.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  3883.     AH = 44h
  3884.     AL = 16h to 18h
  3885. Note:    these obsolete subfunctions (which are no longer supported in Novell
  3886.       DOS 7) are identical to AX=4456h through 4458h
  3887. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  3888. --------O-214451-----------------------------
  3889. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  3890.     AX = 4451h
  3891. Return: CF set if not Concurrent DOS
  3892.         AX = error code (see #1332 at AH=59h/BX=0000h)
  3893.     CF clear if successful
  3894.         AH = single-user/multiuser nature
  3895.         10h single-user
  3896.             AL = operating system version ID (see #1233)
  3897.         14h multiuser
  3898.             AL = operating system version ID (see #1232)
  3899. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  3900.       in the environment variable VER
  3901.     use this function if you are looking for multiuser capabilities,
  3902.       AX=4452h for single-user
  3903.     this function should never return the single-user values
  3904. SeeAlso: AX=4452h,AX=4459h
  3905.  
  3906. (Table 1232)
  3907. Values for Digital Research operating system version ID:
  3908.  32h    Concurrent PC DOS 3.2
  3909.  41h    Concurrent DOS 4.1
  3910.  50h    Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  3911.  60h    Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  3912.  62h    Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  3913.  66h    DR Multiuser DOS 5.1
  3914.  67h    Concurrent DOS 5.1
  3915. --------O-214452-----------------------------
  3916. INT 21 - DR DOS 3.41+ - DETERMINE DOS TYPE/GET DR DOS VERSION
  3917.     AX = 4452h ("DR")
  3918.     CF set
  3919. Return: CF set if not DR DOS
  3920.         AX = error code (see #1332 at AH=59h/BX=0000h)
  3921.     CF clear if DR DOS
  3922.         AX = version code
  3923.         AH = single-user/multiuser nature
  3924.         10h single-user
  3925.             AL = operating system version ID (see #1233)
  3926.         14h multiuser
  3927.             AL = operating system version ID (see #1232)
  3928.         DX modified (refer to note below)
  3929. Notes:    the DR DOS version is stored in the environment variable VER
  3930.     use this function if looking for single-user capabilities, AX=4451h
  3931.       if looking for multiuser; this call should never return multiuser
  3932.       values
  3933.     in DR DOS 3.41-6.0, DX=AX on return; for Novell DOS 7, DH=AH but DL=00h
  3934.       (reportedly, DH=00h when booting NWDOS7 from installation disks)
  3935.     Novell DOS 7 returns error code 0001h if SETVER 255.x is in effect for
  3936.       the calling program
  3937. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  3938.  
  3939. (Table 1233)
  3940. Values for Digital Research operating system version ID:
  3941.  60h    DOS Plus
  3942.  63h    DR DOS 3.41
  3943.  64h    DR DOS 3.42
  3944.  65h    DR DOS 5.00
  3945.  67h    DR DOS 6.00
  3946.  70h    PalmDOS
  3947.  71h    DR DOS 6.0 March 1993 "business update"
  3948.  72h    Novell DOS 7.0
  3949. --------O-214454-----------------------------
  3950. INT 21 U - DR DOS 3.41+ - SET GLOBAL PASSWORD
  3951.     AX = 4454h
  3952.     DS:DX -> password string (blank-padded to 8 characters)
  3953. Desc:    Specify the master password for accessing files.
  3954. SeeAlso: AX=4303h,AX=4414h
  3955. --------O-214456-----------------------------
  3956. INT 21 U - DR DOS 5.0+ - HISTORY BUFFER CONTROL
  3957.     AX = 4456h
  3958.     DL = control flags (see #1234)
  3959. Return: AL = previous value of state flags (see #1235)
  3960. Note:    DR DOS 6.0 only checks bit 0 and ignores the rest of DL
  3961. SeeAlso: #1236
  3962.  
  3963. Bitfields for control flags:
  3964. Bit(s)    Description    (Table 1234)
  3965.  0    whose buffer: 0=application, 1=COMMAND.COM
  3966. ---Novell DOS 7---
  3967.  1    toggle HISTORY usage
  3968.  2    toggle INSERT state
  3969. Note:    only one bit at a time may be used
  3970.  
  3971. Bitfields for state flags:
  3972. Bit(s)    Description    (Table 1235)
  3973.  0    HISTORY buffer enabled
  3974.  1    INSERT enabled
  3975.  2-5    unused
  3976.  7    whose buffer: 0=application, 1=COMMAND.COM
  3977. --------O-214457-----------------------------
  3978. INT 21 U - DR DOS 5.0-6.0 - SHARE/HILOAD CONTROL
  3979.     AX = 4457h
  3980.     DH = subfunction
  3981.         00h enable/disable SHARE
  3982.         DL = 00h disable
  3983.            = 01h enable
  3984.            else Return: AX = ???
  3985.         01h get HILOAD status
  3986.         Return: AX = status
  3987.                 0000h off
  3988.                 0001h on
  3989.         02h set HILOAD status
  3990.         DL = new state (00h off, 01h on)
  3991.         Return: AX = ???
  3992.         other
  3993.         Return: AX = ???
  3994. Note:    This was seen called by COMMAND.COM of DR DOS 6.0; it does not seem
  3995.       to be supported by Novell DOS 7
  3996. SeeAlso: AX=4457h/DX=FFFFh
  3997. --------O-214457DXFFFF-----------------------
  3998. INT 21 U - DR DOS 6.0 - GET SHARE STATUS
  3999.     AX = 4457h
  4000.     DX = FFFFh
  4001. Return: AX = SHARE status
  4002. SeeAlso: INT 2F/AX=1000h
  4003. --------O-214458-----------------------------
  4004. INT 21 U - DR DOS 5.0+ internal - GET POINTER TO INTERNAL VARIABLE TABLE
  4005.     AX = 4458h
  4006. Return: ES:BX -> internal variable table (see #1236,#1237)
  4007.     AX = ??? (0B50h for DR DOS 5.0, 0A56h for DR DOS 6.0, 0FE4h for
  4008.           Novell DOS 7)
  4009. SeeAlso: AX=4452h
  4010.  
  4011. Format of DR DOS 5.0-6.0 internal variable table:
  4012. Offset    Size    Description    (Table 1236)
  4013.  00h    WORD    ???
  4014.  02h    WORD    segment of ???
  4015.  04h    WORD    offset within DOS data segment of history control structure
  4016.           for COMMAND.COM history buffer (see #1238)
  4017.  06h    WORD    offset within DOS data segment of history control structure
  4018.           for application history buffer (see #1238)
  4019.  08h    BYTE    initial history state flags (see #1235)
  4020.  09h  2 BYTEs    ???
  4021.  0Bh    WORD    KB of extended memory at startup
  4022.  0Dh    BYTE    number of far jump entry points
  4023.  0Eh    WORD    segment containing far jumps to DR DOS entry points (see #1239)
  4024.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  4025.           memory block (see #1240) or 0000h if none; segment is FFFFh
  4026.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  4027.           or 0000h if already used
  4028. ---DR DOS 6.0---
  4029.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  4030.         memory block (see #1240) or 0000h if none; segment is FFFFh
  4031.  16h  8 BYTEs    ???
  4032.  1Eh    WORD    offset in DOS data segment of full COUNTRY.SYS filename
  4033.  20h  8 BYTEs    ???
  4034.  28h    WORD    offset in DOS data segment of SHARE hook table
  4035.  2Ah  2 BYTEs    ???
  4036.  2Ch    WORD    offset in DOS data segment of far pointer to INT 2F/AX=1000h
  4037.           handler
  4038. Note:    the segment used for the DR DOS 6.0 CONFIG environment variables
  4039.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  4040.       called from CONFIG.SYS. The word is set to zero later when the area
  4041.       is copied to the COMMAND.COM environment space.  This allows
  4042.       CONFIG.SYS to pass information to AUTOEXEC.BAT.
  4043.  
  4044. Format of Novell DOS 7 internal variable table:
  4045. Offset    Size    Description    (Table 1237)
  4046.  00h    ???
  4047.  1Eh    WORD    offset of COUNTRY.SYS filename
  4048.  42h 16 DWORDs    pointers to ??? entry points
  4049.     ???
  4050.  
  4051. Format of history control structure:
  4052. Offset    Size    Description    (Table 1238)
  4053.  00h    WORD    segment of buffer
  4054.  02h    WORD    size of buffer in bytes
  4055.  04h    WORD    ???
  4056.  
  4057. Format of kernel entry jump table for DR DOS 5.0-6.0:
  4058. Offset    Size    Description    (Table 1239)
  4059.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  4060.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  4061.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  4062.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22 (RETF)
  4063.  14h  5 BYTEs    far jump to kernel entry point for INT 23 (RETF)
  4064.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  4065.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  4066.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  4067.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  4068.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  4069.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  4070.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  4071.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  4072.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  4073.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  4074.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  4075. Notes:    all of these entry points are indirected through this jump table
  4076.       to allow the kernel to be relocated into high memory while leaving
  4077.       the actual entry addresses in low memory for maximum compatibility
  4078.     some of these entry points (22h,23h,24h,2Eh,2Fh) are replaced as soon
  4079.       as COMMAND.COM is loaded, and return immediately to the caller, some
  4080.       returning an error code (the original handler for INT 2F returns
  4081.       AL=03h [fail]).
  4082.  
  4083. Format of HMA Memory Block (DR DOS 6.0 kernel loaded in HMA):
  4084. Offset    Size    Description    (Table 1240)
  4085.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  4086.  02h    WORD    size of this block in bytes (at least 10h)
  4087.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  4088.         00h system
  4089.         01h KEYB
  4090.         02h NLSFUNC
  4091.         03h SHARE
  4092.         04h TaskMAX
  4093.         05h COMMAND
  4094.  05h    var    TSR (or system) code and data. DR DOS TSR's, such as KEYB,
  4095.           hooks interrupts using segment FFFEh instead FFFFh.
  4096. --------O-214459-----------------------------
  4097. INT 21 - DR MultiUser DOS 5.0 - API
  4098.     AX = 4459h
  4099.     CL = function (see #3651 at INT E0"CP/M-86")
  4100.     DS,DX = parameters
  4101. Notes:    DR DOS 5.0 and Novell DOS 7 return CF set and AX=0001h
  4102.     this API is also available on INT E0
  4103. SeeAlso: AX=4452h,INT E0"CP/M-86"
  4104. --------v-2144A0-----------------------------
  4105. INT 21 - VIRUS - "Horns" - INSTALLATION CHECK
  4106.     AX = 44A0h
  4107. Return: AH = FFh if installed
  4108. SeeAlso: AX=4243h"VIRUS",AX=4B04h"VIRUS"
  4109. --------N-2144E0-----------------------------
  4110. INT 21 U - Sun PC-NFS - API???
  4111.     AX = 44E0h
  4112.     DS:DX -> ???
  4113.     SS:BP -> stack frame (see #1241)
  4114. Return: ???
  4115. Note:    this function is also supported by Beame&Whiteside's BWPCNFS shim; the
  4116.       description presented here was derived from that shim
  4117.  
  4118. Format of PC-NFS stack frame:
  4119. Offset    Size    Description    (Table 1241)
  4120.  00h    WORD    -> previous stack frame
  4121.  02h    DWORD    return address
  4122. --------d-2144FFBXFFFF-----------------------
  4123. INT 21 U - NewSpace - ???
  4124.     AX = 44FFh
  4125.     BX = FFFFh
  4126.     DX = ???
  4127. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  4128.       all files as they are written and decompresses them as they are read
  4129. SeeAlso: AX=4414h/BX=FFFFh
  4130. --------D-2145-------------------------------
  4131. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  4132.     AH = 45h
  4133.     BX = file handle
  4134. Return: CF clear if successful
  4135.         AX = new handle
  4136.     CF set on error
  4137.         AX = error code (04h,06h) (see #1332 at AH=59h/BX=0000h)
  4138. Notes:    moving file pointer for either handle will also move it for the other,
  4139.       because both will refer to the same system file table
  4140.     for DOS versions prior to 3.3, file writes may be forced to disk by
  4141.       duplicating the file handle and closing the duplicate
  4142. SeeAlso: AH=3Dh,AH=46h
  4143. --------D-2146-------------------------------
  4144. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  4145.     AH = 46h
  4146.     BX = file handle
  4147.     CX = file handle to become duplicate of first handle
  4148. Return: CF clear if successful
  4149.     CF set on error
  4150.         AX = error code (04h,06h) (see #1332 at AH=59h/BX=0000h)
  4151. Notes:    closes file with handle CX if it is still open
  4152.     DOS 3.30 hangs if BX=CX on entry
  4153.     moving file pointer for either handle will also move it for the other,
  4154.       because both will refer to the same system file table
  4155. SeeAlso: AH=3Dh,AH=45h
  4156. --------D-2147-------------------------------
  4157. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  4158.     AH = 47h
  4159.     DL = drive number (00h = default, 01h = A:, etc)
  4160.     DS:SI -> 64-byte buffer for ASCIZ pathname
  4161. Return: CF clear if successful
  4162.         AX = 0100h (undocumented)
  4163.     CF set on error
  4164.         AX = error code (0Fh) (see #1332 at AH=59h/BX=0000h)
  4165. Notes:    the returned path does not include a drive or the initial backslash
  4166.     many Microsoft products for Windows rely on AX being 0100h on success
  4167.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  4168. SeeAlso: AH=19h,AH=3Bh,AH=71h,INT 15/AX=DE25h
  4169. --------D-2148-------------------------------
  4170. INT 21 - DOS 2+ - ALLOCATE MEMORY
  4171.     AH = 48h
  4172.     BX = number of paragraphs to allocate
  4173. Return: CF clear if successful
  4174.         AX = segment of allocated block
  4175.     CF set on error
  4176.         AX = error code (07h,08h) (see #1332 at AH=59h/BX=0000h)
  4177.         BX = size of largest available block
  4178. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  4179.       allocate
  4180.     .COM programs are initially allocated the largest available memory
  4181.       block, and should free some memory with AH=49h before attempting any
  4182.       allocations
  4183.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  4184.       near pointer to the allocated block on a successful return
  4185. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  4186. --------D-2149-------------------------------
  4187. INT 21 - DOS 2+ - FREE MEMORY
  4188.     AH = 49h
  4189.     ES = segment of block to free
  4190. Return: CF clear if successful
  4191.     CF set on error
  4192.         AX = error code (07h,09h) (see #1332 at AH=59h/BX=0000h)
  4193. Notes:    apparently never returns an error 07h, despite official docs; DOS 2.1+
  4194.       code contains only an error 09h exit
  4195.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  4196.       freed, only when a block is allocated or resized
  4197.     the code for this function is identical in DOS 2.1-6.0 except for
  4198.       calls to start/end a critical section in DOS 3.0+
  4199. SeeAlso: AH=48h,AH=4Ah
  4200. --------D-214A-------------------------------
  4201. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  4202.     AH = 4Ah
  4203.     BX = new size in paragraphs
  4204.     ES = segment of block to resize
  4205. Return: CF clear if successful
  4206.     CF set on error
  4207.         AX = error code (07h,08h,09h) (see #1332 at AH=59h/BX=0000h)
  4208.         BX = maximum paragraphs available for specified memory block
  4209. Notes:    under DOS 2.1-6.0, if there is insufficient memory to expand the block
  4210.       as much as requested, the block will be made as large as possible
  4211.     DOS 2.1-6.0 coalesces any free blocks immediately following the block
  4212.       to be resized
  4213. SeeAlso: AH=48h,AH=49h,AH=83h
  4214. --------v-214A--BX00B6-----------------------
  4215. INT 21 - VIRUS???
  4216.     AH = 4Ah
  4217.     BX = 00B6h
  4218.     ES = CX
  4219. Return: ???
  4220. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  4221.       with Novell DOS 7, and is presumably some virus's installation check
  4222. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=FFFFh,AH=D2h"VIRUS"
  4223. --------v-214A--BXFFFF-----------------------
  4224. INT 21 - VIRUS???
  4225.     AH = 4Ah
  4226.     BX = FFFFh
  4227.     CX = 0568h
  4228.     SI = 0129h
  4229.     DI = 0000h
  4230.     ES = BP
  4231. Return: ???
  4232. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  4233.       with Novell DOS 7, and is presumably some virus's installation check
  4234. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=00B6h
  4235. --------D-214B-------------------------------
  4236. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  4237.     AH = 4Bh
  4238.     AL = type of load
  4239.         00h load and execute
  4240.         01h load but do not execute
  4241.         03h load overlay (see #1243)
  4242.         04h load and execute in background (European MS-DOS 4.0 only)
  4243.         "Exec & Go" (see also AH=80h)
  4244.     DS:DX -> ASCIZ program name (must include extension)
  4245.     ES:BX -> parameter block (see #1242,#1243,#1244)
  4246.     CX = mode (subfunction 04h only)
  4247.         0000h child placed in zombie mode after termination
  4248.         0001h child's return code discarded on termination
  4249. Return: CF clear if successful
  4250.         BX,DX destroyed
  4251.         if subfunction 01h, process ID set to new program's PSP; get with
  4252.         INT 21/AH=62h
  4253.     CF set on error
  4254.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see #1332 at AH=59h)
  4255. Notes:    DOS 2.x destroys all registers, including SS:SP
  4256.     under ROM-based DOS, if no disk path characters (colons or slashes)
  4257.       are included in the program name, the name is searched for in the
  4258.       ROM module headers (see #1247) before searching on disk
  4259.     for functions 00h and 01h, the calling process must ensure that there
  4260.       is enough unallocated memory available; if necessary, by releasing
  4261.       memory with AH=49h or AH=4Ah
  4262.     for function 01h, the AX value to be passed to the child program is put
  4263.       on top of the child's stack
  4264.     for function 03h, DOS assumes that the overlay is being loaded into
  4265.       memory allocated by the caller
  4266.     function 01h was undocumented prior to the release of DOS 5.0
  4267.     some versions (such as DR DOS 6.0) check the parameters and parameter
  4268.       block and return an error if an invalid value (such as an offset of
  4269.       FFFFh) is found
  4270.     background programs under European MS-DOS 4.0 must use the new
  4271.       executable format
  4272.     this function ignores the filename extension, instead checking the
  4273.       first two bytes of the file to determine whether there is a valid
  4274.       .EXE header (see #1246); if not, the file is assumed to be in .COM
  4275.       format.  If present, the file may be in any of several formats which
  4276.       are extensions of the original .EXE format (see #1245)
  4277.     .COM-format executables begin running with the following register
  4278.       values:
  4279.         AL = 00h if first FCB has valid drive letter, FFh if not
  4280.         AH = 00h if second FCB has valid drive letter, FFh if not
  4281.         CS,DS,ES,SS = PSP segment
  4282.         SP = offset of last word available in first 64K segment
  4283.         (note: AX is always 0000h under DESQview)
  4284.     old-format executables begin running with the following register
  4285.       values:
  4286.         AL = 00h if first FCB has valid drive letter, FFh if not
  4287.         AH = 00h if second FCB has valid drive letter, FFh if not
  4288.         DS,ES = PSP segment
  4289.         SS:SP as defined in .EXE header
  4290.         (note: AX is always 0000h under DESQview)
  4291.     new executables begin running with the following register values
  4292.         AX = environment segment
  4293.         BX = offset of command tail in environment segment
  4294.         CX = size of automatic data segment (0000h = 64K)
  4295.         ES,BP = 0000h
  4296.         DS = automatic data segment
  4297.         SS:SP = initial stack
  4298.       the command tail corresponds to an old executable's PSP:0081h and
  4299.       following, except that the 0Dh is turned into a NUL (00h); new
  4300.       format executables have no PSP
  4301.     under the FlashTek X-32 DOS extender, only function 00h is supported
  4302.       and the pointers are passed in DS:EDX and ES:EBX
  4303.     DR DOS 6 always loads .EXE-format programs with no fixups and
  4304.       .COM-format programs starting with 9Ch 55h (PUSHF/PUSH BP) above the
  4305.       64K mark to avoid the EXEPACK bug, by extending the memory block
  4306.       containing the program's environment; this code is disabled if the
  4307.       name of the parent program as stored in the MCB is 'WIN'.
  4308. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  4309.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  4310.       file contains additional data after the actual overlay
  4311. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h/BX=0025h,AH=8Ah,INT 2E,INT 60/DI=0604h
  4312.  
  4313. Format of EXEC parameter block for AL=00h,01h,04h:
  4314. Offset    Size    Description    (Table 1242)
  4315.  00h    WORD    segment of environment to copy for child process (copy caller's
  4316.           environment if 0000h)
  4317.  02h    DWORD    pointer to command tail to be copied into child's PSP
  4318.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  4319.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  4320.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  4321.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  4322. SeeAlso: #1243,#1244
  4323.  
  4324. Format of EXEC parameter block for AL=03h:
  4325. Offset    Size    Description    (Table 1243)
  4326.  00h    WORD    segment at which to load overlay
  4327.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  4328. SeeAlso: #1242,#1244
  4329.  
  4330. Format of EXEC parameter block for FlashTek X-32:
  4331. Offset    Size    Description    (Table 1244)
  4332.  00h    PWORD    48-bit far pointer to environment string
  4333.  06h    PWORD    48-bit far pointer to command tail string
  4334. SeeAlso: #1242,#1243
  4335.  
  4336. (Table 1245)
  4337. Values for the executable types understood by various environments:
  4338.  MZ    old-style DOS executable (see #1246)
  4339.  NE    Windows or OS/2 1.x segmented ("new") executable (see #1248)
  4340.  LE    Windows virtual device driver (VxD) linear executable (see #1261)
  4341.  LX    variant of LE used in OS/2 2.x (see #1261)
  4342.  W3    Windows WIN386.EXE file; a collection of LE files
  4343.  W4    Windows95 VMM32.VXD file
  4344.  PE    Win32 (Windows NT and Win32s) portable executable based on Unix COFF
  4345.  DL    HP 100LX/200LX system manager compliant executable (.EXM)
  4346.  MP    old PharLap .EXP (see #1271)
  4347.  P2    PharLap 286 .EXP (see #1272)
  4348.  P3    PharLap 386 .EXP (see #1272)
  4349.  
  4350. Format of .EXE file header:
  4351. Offset    Size    Description    (Table 1246)
  4352.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  4353.           (see also #1245)
  4354.  02h    WORD    number of bytes in last 512-byte page of executable
  4355.  04h    WORD    total number of 512-byte pages in executable (includes any
  4356.         partial last page)
  4357.  06h    WORD    number of relocation entries
  4358.  08h    WORD    header size in paragraphs
  4359.  0Ah    WORD    minimum paragraphs of memory required to allocate in addition
  4360.           to executable's size
  4361.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  4362.  0Eh    WORD    initial SS relative to start of executable
  4363.  10h    WORD    initial SP
  4364.  12h    WORD    checksum (one's complement of sum of all words in executable)
  4365.  14h    DWORD    initial CS:IP relative to start of executable
  4366.  18h    WORD    offset within header of relocation table
  4367.         40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  4368.  1Ah    WORD    overlay number (normally 0000h = main program)
  4369. ---new executable---
  4370.  1Ch  4 BYTEs    ???
  4371.  20h    WORD    behavior bits
  4372.  22h 26 BYTEs    reserved for additional behavior info
  4373.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  4374.         or 00000000h if plain MZ executable
  4375. ---Borland TLINK---
  4376.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  4377.  1Eh    BYTE    signature FBh
  4378.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  4379.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  4380. ---ARJ self-extracting archive---
  4381.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  4382.         the first 1000 bytes of the file)
  4383. ---LZEXE 0.90 compressed executable---
  4384.  1Ch  4 BYTEs    signature "LZ09"
  4385. ---LZEXE 0.91 compressed executable---
  4386.  1Ch  4 BYTEs    signature "LZ91"
  4387. ---PKLITE compressed executable---
  4388.  1Ch    BYTE    minor version number
  4389.  1Dh    BYTE    bits 0-3: major version
  4390.         bit 4: extra compression
  4391.         bit 5: huge (multi-segment) file
  4392.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  4393. ---LHarc 1.x self-extracting archive---
  4394.  1Ch  4 BYTEs    unused???
  4395.  20h  3 BYTEs    jump to start of extraction code
  4396.  23h  2 BYTEs    ???
  4397.  25h 12 BYTEs    signature "LHarc's SFX "
  4398. ---LHA 2.x self-extracting archive---
  4399.  1Ch  8 BYTEs    ???
  4400.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  4401. ---TopSpeed C 3.0 CRUNCH compressed file---
  4402.  1Ch    DWORD    018A0001h
  4403.  20h    WORD    1565h
  4404. ---PKARCK 3.5 self-extracting archive---
  4405.  1Ch    DWORD    00020001h
  4406.  20h    WORD    0700h
  4407. ---BSA (Soviet archiver) self-extracting archive---
  4408.  1Ch    WORD    000Fh
  4409.  1Eh    BYTE    A7h
  4410. ---LARC self-extracting archive---
  4411.  1Ch  4 BYTEs    ???
  4412.  20h 11 BYTEs    "SFX by LARC "
  4413. ---LH self-extracting archive---
  4414.  1Ch  8 BYTEs    ???
  4415.  24h  8 BYTEs    "LH's SFX "
  4416. ---RAR self-extracting archive---
  4417.  1Ch  4 BYTEs    signature "RSFX"
  4418. ---other linkers---
  4419.  1Ch    var    optional information
  4420. ---
  4421.   N   N DWORDs    relocation items
  4422. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  4423.       versions of the MS linker set it that way
  4424.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  4425.       program is loaded as high in memory as possible (DOS only checks
  4426.       the maximum allocation, however)
  4427.     the maximum allocation is set to FFFFh by default
  4428.     additional data may be contained in the file beyond the end of the
  4429.       load image described by the .EXE header; this data may be overlays,
  4430.       the actual executable for newer-format executables, or debugging
  4431.       information (see #1252,#1276)
  4432. SeeAlso: #1248
  4433.  
  4434. Format of ROM Module Header:
  4435. Offset    Size    Description    (Table 1247)
  4436.  00h  2 BYTEs    ROM signature 55h, AAh
  4437.  02h    BYTE    size of ROM in 512-byte blocks
  4438.  03h  3 BYTEs    POST initialization entry point (near JMP instruction)
  4439.  06h    ROM Program Name List [array]
  4440.     Offset    Size    Description
  4441.      00h    BYTE    length of ROM program's name (00h if end of name list)
  4442.      01h  N BYTEs    program name
  4443.      N+1  3 BYTEs    program entry point (near JMP instruction)
  4444.  
  4445. Format of new executable header:
  4446. Offset    Size    Description    (Table 1248)
  4447.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  4448.  02h  2 BYTEs    linker version (major, then minor)
  4449.  04h    WORD    offset from start of this header to entry table (see #1255)
  4450.  06h    WORD    length of entry table in bytes
  4451.  08h    DWORD    file load CRC (0 in Borland's TPW)
  4452.  0Ch    BYTE    program flags (see #1249)
  4453.  0Dh    BYTE    application flags (see #1250)
  4454.  0Eh    WORD    auto data segment index
  4455.  10h    WORD    initial local heap size
  4456.  12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
  4457.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  4458.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  4459.         if SS=automatic data segment and SP=0000h, the stack pointer is
  4460.           set to the top of the automatic data segment, just below the
  4461.           local heap
  4462.  1Ch    WORD    segment count
  4463.  1Eh    WORD    module reference count
  4464.  20h    WORD    length of nonresident names table in bytes
  4465.  22h    WORD    offset from start of this header to segment table (see #1253)
  4466.  24h    WORD    offset from start of this header to resource table
  4467.  26h    WORD    offset from start of this header to resident names table
  4468.  28h    WORD    offset from start of this header to module reference table
  4469.  2Ah    WORD    offset from start of this header to imported names table
  4470.         (array of counted strings, terminated with a string of length
  4471.           00h)
  4472.  2Ch    DWORD    offset from start of file to nonresident names table
  4473.  30h    WORD    count of moveable entry point listed in entry table
  4474.  32h    WORD    file alignment size shift count
  4475.         0 is equivalent to 9 (default 512-byte pages)
  4476.  34h    WORD    number of resource table entries
  4477.  36h    BYTE    target operating system
  4478.         00h unknown
  4479.         01h OS/2
  4480.         02h Windows
  4481.         03h European MS-DOS 4.x
  4482.         04h Windows 386
  4483.         05h BOSS (Borland Operating System Services)
  4484.         81h PharLap 286|DOS-Extender, OS/2
  4485.         82h PharLap 286|DOS-Extender, Windows
  4486.  37h    BYTE    other EXE flags (see #1251)
  4487.  38h    WORD    offset to return thunks or start of gangload area
  4488.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  4489.  3Ch    WORD    minimum code swap area size
  4490.  3Eh  2 BYTEs    expected Windows version (minor version first)
  4491. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  4492.       Reference, Vol 4.
  4493. SeeAlso: #1246
  4494.  
  4495. Bitfields for new executable program flags:
  4496. Bit(s)    Description    (Table 1249)
  4497.  0-1    DGROUP type
  4498.       0 = none
  4499.       1 = single shared
  4500.       2 = multiple (unshared)
  4501.       3 = (null)
  4502.  2    global initialization
  4503.  3    protected mode only
  4504.  4    8086 instructions
  4505.  5    80286 instructions
  4506.  6    80386 instructions
  4507.  7    80x87 instructions
  4508.  
  4509. Bitfields for new executable application flags:
  4510. Bit(s)    Description    (Table 1250)
  4511.  0-2    application type
  4512.     001 full screen (not aware of Windows/P.M. API)
  4513.     010 compatible with Windows/P.M. API
  4514.     011 uses Windows/P.M. API
  4515.  3    is a Family Application (OS/2)
  4516.  5    0=executable, 1=errors in image
  4517.  6    non-conforming program (valid stack is not maintained)
  4518.  7    DLL or driver rather than application
  4519.     (SS:SP info invalid, CS:IP points at FAR init routine called with
  4520.       AX=module handle which returns AX=0000h on failure, AX nonzero on
  4521.       successful initialization)
  4522.  
  4523. Bitfields for other new .EXE flags:
  4524. Bit(s)    Description    (Table 1251)
  4525.  0    supports long filenames
  4526.  1    2.X protected mode
  4527.  2    2.X proportional font
  4528.  3    gangload area
  4529.  
  4530. Format of Codeview trailer (at end of executable):
  4531. Offset    Size    Description    (Table 1252)
  4532.  00h    WORD    signature 4E42h ('NB')
  4533.  02h    WORD    Microsoft debug info version number
  4534.  04h    DWORD    Codeview header offset
  4535. SeeAlso: #1276
  4536.  
  4537. Format of new executable segment table record:
  4538. Offset    Size    Description    (Table 1253)
  4539.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  4540.  02h    WORD    length of image in file (0000h = 64K)
  4541.  04h    WORD    segment attributes (see #1254)
  4542.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  4543. Note:    the first segment table entry is entry number 1
  4544. SeeAlso: #1256
  4545.  
  4546. Bitfields for segment attributes:
  4547. Bit(s)    Description    (Table 1254)
  4548.  0    data segment rather than code segment
  4549.  1    unused???
  4550.  2    real mode
  4551.  3    iterated
  4552.  4    movable
  4553.  5    sharable
  4554.  6    preloaded rather than demand-loaded
  4555.  7    execute-only (code) or read-only (data)
  4556.  8    relocations (directly following code for this segment)
  4557.  9    debug info present
  4558.  10,11    80286 DPL bits
  4559.  12    discardable
  4560.  13-15    discard priority
  4561.  
  4562. Format of new executable entry table item (list):
  4563. Offset    Size    Description    (Table 1255)
  4564.  00h    BYTE    number of entry points (00h if end of entry table list)
  4565.  01h    BYTE    segment number (00h if end of entry table list)
  4566.  02h 3N BYTEs    entry records
  4567.         Offset    Size    Description
  4568.          00h    BYTE    flags
  4569.                 bit 0: exported
  4570.                 bit 1: single data
  4571.                 bits 2-7: unused???
  4572.          01h    WORD    offset within segment
  4573.  
  4574. Format of new executable relocation data (immediately follows segment image):
  4575. Offset    Size    Description    (Table 1256)
  4576.  00h    WORD    number of relocation items
  4577.  02h 8N BYTEs    relocation items
  4578.         Offset    Size    Description
  4579.          00h    BYTE    relocation type
  4580.                 00h LOBYTE
  4581.                 02h BASE
  4582.                 03h PTR
  4583.                 05h OFFS
  4584.                 0Bh PTR48
  4585.                 0Dh OFFS32
  4586.          01h    BYTE    flags
  4587.                 bit 2: additive
  4588.          02h    WORD    offset within segment
  4589.          04h    WORD    target address segment
  4590.          06h    WORD    target address offset
  4591. SeeAlso: #1253,#1257
  4592.  
  4593. Format of new executable resource data:
  4594. Offset    Size    Description    (Table 1257)
  4595.  00h    WORD    alignment shift count for resource data
  4596.  02h  N RECORDs resources
  4597.     Format of resource record:
  4598.     Offset    Size    Description
  4599.      00h    WORD    type ID
  4600.             0000h if end of resource records
  4601.             >= 8000h if integer type
  4602.             else offset from start of resource table to type string
  4603.      02h    WORD    number of resources of this type
  4604.      04h    DWORD    reserved for runtime use
  4605.      08h  N Resources (see #1258)
  4606. Note:    resource type and name strings are stored immediately following the
  4607.       resource table, and are not null-terminated
  4608. SeeAlso: #1258
  4609.  
  4610. Format of new executable resource entry:
  4611. Offset    Size    Description    (Table 1258)
  4612.  00h    WORD    offset in alignment units from start of file to contents of
  4613.         the resource data
  4614.  02h    WORD    length of resource image in bytes
  4615.  04h    WORD    flags
  4616.         bit 4: moveable
  4617.         bit 5: shareable
  4618.         bit 6: preloaded
  4619.  06h    WORD    resource ID
  4620.         >= 8000h if integer resource
  4621.         else offset from start of resource table to resource string
  4622.  08h    DWORD    reserved for runtime use
  4623. Notes:    resource type and name strings are stored immediately following the
  4624.       resource table, and are not null-terminated
  4625.     strings are counted strings, with a string of length 0 indicating the
  4626.       end of the resource table
  4627. SeeAlso: #1257,#1259
  4628.  
  4629. Format of new executable module reference table [one bundle of entries]:
  4630. Offset    Size    Description    (Table 1259)
  4631.  00h    BYTE    number of records in this bundle (00h if end of table)
  4632.  01h    BYTE    segment indicator
  4633.         00h unused
  4634.         FFh movable segment, segment number is in entry
  4635.         else segment number of fixed segment
  4636.  02h  N RECORDs
  4637.     Format of segment record
  4638.     Offset    Size    Description
  4639.      00h    BYTE    flags
  4640.             bit 0: entry is exported
  4641.             bit 1: entry uses global (shared) data
  4642.             bits 7-3: number of parameter words
  4643.     ---fixed segment---
  4644.      01h    WORD    offset
  4645.     ---moveable segment---
  4646.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  4647.      03h    BYTE    segment number
  4648.      05h    WORD    offset
  4649. Note:    table entries are numbered starting from 1
  4650. SeeAlso: #1260
  4651.  
  4652. Format of new executable resident/nonresident name table entry:
  4653. Offset    Size    Description    (Table 1260)
  4654.  00h    BYTE    length of string (00h if end of table)
  4655.  01h  N BYTEs    ASCII text of string
  4656.  N+1    WORD    ordinal number (index into entry table)
  4657. Notes:    the first string in the resident name table is the module name; the
  4658.       first entry in the nonresident name table is the module description
  4659.     the strings are case-sensitive; if the executable was linked with
  4660.       /IGNORECASE, all strings are in uppercase
  4661. SeeAlso: #1259
  4662.  
  4663. Format of Linear Executable (enhanced mode executable) header:
  4664. Offset    Size    Description    (Table 1261)
  4665.  00h  2 BYTEs    "LE" (4Ch 45h) signature (Windows)
  4666.         "LX" (4Ch 58h) signature (OS/2)
  4667.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  4668.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  4669.  04h    DWORD    executable format level
  4670.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  4671.         01h Intel 80286 or upwardly compatible
  4672.         02h Intel 80386 or upwardly compatible
  4673.         03h Intel 80486 or upwardly compatible
  4674.         04h Intel Pentium (80586) or upwardly compatible
  4675.         20h Intel i860 (N10) or compatible
  4676.         21h Intel "N11" or compatible
  4677.         40h MIPS Mark I (R2000, R3000) or compatible
  4678.         41h MIPS Mark II (R6000) or compatible
  4679.         42h MIPS Mark III (R4000) or compatible
  4680.  0Ah    WORD    target operating system
  4681.         01h OS/2
  4682.         02h Windows
  4683.         03h European DOS 4.0
  4684.         04h Windows 386
  4685.  0Ch    DWORD    module version
  4686.  10h    DWORD    module type (see #1262)
  4687.  14h    DWORD    number of memory pages
  4688.  18h    Initial CS:EIP
  4689.     DWORD    object number
  4690.     DWORD    offset
  4691.  20h    Initial SS:ESP
  4692.     DWORD    object number
  4693.     DWORD    offset
  4694.  28h    DWORD    memory page size
  4695.  2Ch    DWORD    (Windows LE) bytes on last page
  4696.         (OS/2 LX) page offset shift count
  4697.  30h    DWORD    fixup section size
  4698.  34h    DWORD    fixup section checksum
  4699.  38h    DWORD    loader section size
  4700.  3Ch    DWORD    loader section checksum
  4701.  40h    DWORD    offset of object table (see #1263)
  4702.  44h    DWORD    object table entries
  4703.  48h    DWORD    object page map table offset (see #1265)
  4704.  4Ch    DWORD    object iterate data map offset
  4705.  50h    DWORD    resource table offset
  4706.  54h    DWORD    resource table entries
  4707.  58h    DWORD    resident names table offset (see #1266)
  4708.  5Ch    DWORD    entry table offset (see #1267,#1268)
  4709.  60h    DWORD    module directives table offset
  4710.  64h    DWORD    Module Directives entries
  4711.  68h    DWORD    Fixup page table offset
  4712.  6Ch    DWORD    Fixup record table offset (see #1270)
  4713.  70h    DWORD    imported modules name table offset
  4714.  74h    DWORD    imported modules count
  4715.  78h    DWORD    imported procedures name table offset
  4716.  7Ch    DWORD    per-page checksum table offset
  4717.  80h    DWORD    data pages offset
  4718.  84h    DWORD    preload page count
  4719.  88h    DWORD    non-resident names table offset
  4720.  8Ch    DWORD    non-resident names table length
  4721.  90h    DWORD    non-resident names checksum
  4722.  94h    DWORD    automatic data object
  4723.  98h    DWORD    debug information offset
  4724.  9Ch    DWORD    debug information length
  4725.  A0h    DWORD    preload instance pages number
  4726.  A4h    DWORD    demand instance pages number
  4727.  A8h    DWORD    extra heap allocation
  4728.  ACh 12 BYTEs    reserved
  4729.  B8h    DWORD    offset of VERSIONINFO resource (MS-Windows VxD only)
  4730.  BCh    DWORD    pointer to ??? (dynamically-loadable VxDs only???)
  4731.  C0h    WORD    device ID (MS-Windows VxD only)
  4732.  C2h    WORD    DDK version (MS-Windows VxD only)
  4733. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  4734.  
  4735. Bitfields for Linear Executable module type:
  4736. Bit(s)    Description    (Table 1262)
  4737.  2    initialization (only for DLLs) 0 = global, 1 = per-process
  4738.  4    no internal fixups in executable image
  4739.  5    no external fixups in executable image
  4740.  8-10    API compatibility
  4741.     0 = unknown
  4742.     1 = incompatible with PM windowing \
  4743.     2 = compatible with PM windowing    > (only for
  4744.     3 = uses PM windowing API       /    programs)
  4745.  13    module not loadable (only for programs)
  4746.  15-17    module type
  4747.     000 program
  4748.     001 library (DLL)
  4749.     011 protected memory library module
  4750.     100 physical device driver
  4751.     110 virtual device driver
  4752.  30    per-process library termination
  4753.     (requires valid CS:EIP, can't be set for .EXE)
  4754.  
  4755. Format of object table entry:
  4756. Offset    Size    Description    (Table 1263)
  4757.  00h    DWORD    virtual size in bytes
  4758.  04h    DWORD    relocation base address
  4759.  08h    DWORD    object flags (see #1264)
  4760.  0Ch    DWORD    page map index
  4761.  10h    DWORD    page map entries (see #1265)
  4762.  14h  4 BYTEs    reserved??? (apparently always zeros)
  4763.  
  4764. Bitfields for object flags:
  4765. Bit(s)    Description    (Table 1264)
  4766.  0    readable
  4767.  1    writable
  4768.  2    executable
  4769.  3    resource
  4770.  4    discardable
  4771.  5    shared
  4772.  6    preloaded
  4773.  7    invalid
  4774.  8-9    type
  4775.     00 normal
  4776.     01 zero-filled
  4777.     10 resident
  4778.     11 resident and contiguous
  4779.  10    resident and long-lockable
  4780.  11    reserved
  4781.  12    16:16 alias required
  4782.  13    "BIG" (Huge: 32-bit)
  4783.  14    conforming
  4784.  15    "OBJECT_I/O_PRIVILEGE_LEVEL"
  4785.  16-31    reserved
  4786.  
  4787. Format of object page map table entry:
  4788. Offset    Size    Description    (Table 1265)
  4789.  00h    BYTE    ??? (usually 00h)
  4790.  01h    WORD    (big-endian) index to fixup table
  4791.         0000h if no relocation info
  4792.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  4793.  
  4794. Format of resident names table entry:
  4795. Offset    Size    Description    (Table 1266)
  4796.  00h    BYTE    length of name
  4797.  01h  N BYTEs    name
  4798.  N+1  3 BYTEs    ???
  4799.  
  4800. Format of LE linear executable entry table:
  4801. Offset    Size    Description    (Table 1267)
  4802.  00h    BYTE    number of entries in table
  4803.  01h 10 BYTEs per entry
  4804.         Offset    Size    Description
  4805.          00h    BYTE    bit flags
  4806.                 bit 0: non-empty bundle
  4807.                 bit 1: 32-bit entry
  4808.          01h    WORD    object number
  4809.          03h    BYTE    entry type flags
  4810.                 bit 0: exported
  4811.                 bit 1: uses single data rather than instance
  4812.                 bit 2: reserved
  4813.                 bits 3-7: number of stack parameters
  4814.          04h    DWORD    offset of entry point
  4815.          08h  2 BYTEs    ???
  4816. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  4817.       and do not contain the remaining nine bytes
  4818.  
  4819. Format of LX linear executable entry table [array]:
  4820. Offset    Size    Description    (Table 1268)
  4821.  00h    BYTE    number of bundles following (00h = end of entry table)
  4822.  01h    BYTE    bundle type
  4823.         00h empty
  4824.         01h 16-bit entry
  4825.         02h 286 callgate entry
  4826.         03h 32-bit entry
  4827.         04h forwarder entry
  4828.         bit 7 set if additional parameter typing information is present
  4829. ---bundle type 00h---
  4830.  no additional fields
  4831. ---bundle type 01h---
  4832.  02h    WORD    object number
  4833.  04h    BYTE    entry flags
  4834.         bit 0: exported
  4835.         bits 7-3: number of stack parameters
  4836.  05h    WORD    offset of entry point in object (shifted by page size shift)
  4837. ---bundle type 02h---
  4838.  02h    WORD    object number
  4839.  04h    BYTE    entry flags
  4840.         bit 0: exported
  4841.         bits 7-3: number of stack parameters
  4842.  05h    WORD    offset of entry point in object
  4843.  07h    WORD    reserved for callgate selector (used by loader)
  4844. ---bundle type 03h---
  4845.  02h    WORD    object number
  4846.  04h    BYTE    entry flags
  4847.         bit 0: exported
  4848.         bits 7-3: number of stack parameters
  4849.  05h    DWORD    offset of entry point in object
  4850. ---bundle type 04h---
  4851.  02h    WORD    reserved
  4852.  04h    BYTE    forwarder flags
  4853.         bit 0: import by ordinal
  4854.         bits 7-1 reserved
  4855.  05h    WORD    module ordinal
  4856.         (forwarder's index into Import Module Name table)
  4857.  07h    DWORD    procedure name offset or import ordinal number
  4858. Note:    all fields after the first two bytes are repeated N times
  4859.  
  4860. Bitfields for linear executable fixup type:
  4861. Bit(s)    Description    (Table 1269)
  4862.  7    ordinal is BYTE rather than WORD
  4863.  6    16-rather than 8-object number/module ordinal
  4864.  5    addition with DWORD rather than WORD
  4865.  4    relocation info has size with new two bytes at end
  4866.  3    reserved (0)
  4867.  2    set if add to destination, clear to replace destination
  4868.  1-0    type
  4869.     00 internal fixup
  4870.     01 external fixup, imported by ordinal
  4871.     10 external fixup, imported by name
  4872.     11 internal fixup via entry table
  4873.  
  4874. Format of linear executable fixup record:
  4875. Offset    Size    Description    (Table 1270)
  4876.  00h    BYTE    type
  4877.         bits 7-4: modifier (0001 single, 0011 multiple)
  4878.         bits 3-0: type
  4879.             0000 byte offset
  4880.             0010 word segment
  4881.             0011 16-bit far pointer (DWORD)
  4882.             0101 16-bit offset
  4883.             0110 32-bit far pointer (PWORD)
  4884.             0111 32-bit offset
  4885.             1000 near call or jump, WORD/DWORD based on seg attrib
  4886.  01h    BYTE    linear executable fixup type (see #1269)
  4887. ---if single type---
  4888.  02h    WORD    offset within page
  4889.  04h    relocation information
  4890.     ---internal fixup---
  4891.     BYTE    object number
  4892.     ---external,ordinal---
  4893.     BYTE    one-based module number in Import Module table
  4894.     BYTE/WORD ordinal number
  4895.     WORD/DWORD value to add (only present if modifier bit 4 set)
  4896.     ---external,name---
  4897.     BYTE    one-based module number in Import Module table
  4898.     WORD    offset in Import Procedure names
  4899.     WORD/DWORD value to add (only present if modifier bit 4 set)
  4900. ---if multiple type---
  4901.  02h    BYTE    number of items
  4902.  03h    var    relocation info as for "single" type (above)
  4903.       N WORDs    offsets of items to relocate
  4904.  
  4905. Format of old Phar Lap .EXP file header:
  4906. Offset    Size    Description    (Table 1271)
  4907.  00h  2 BYTEs    "MP" (4Dh 50h) signature
  4908.  02h    WORD    remainder of image size / page size (page size = 512h)
  4909.  04h    WORD    size of image in pages
  4910.  06h    WORD    number of relocation items
  4911.  08h    WORD    header size in paragraphs
  4912.  0Ah    WORD    minimum number of extra 4K pages to be allocated at the end
  4913.           of program, when it is loaded
  4914.  0Ch    WORD    maximum number of extra 4K pages to be allocated at the end
  4915.           of program, when it is loaded
  4916.  0Eh    DWORD    initial ESP
  4917.  12h    WORD    word checksum of file
  4918.  14h    DWORD    initial EIP
  4919.  18h    WORD    offset of first relocation item
  4920.  1Ah    WORD    overlay number
  4921.  1Ch    WORD    ??? (wants to be 1)
  4922. SeeAlso: #1272
  4923.  
  4924. Format of new Phar Lap .EXP file header:
  4925. Offset    Size    Description    (Table 1272)
  4926.  00h  2 BYTEs    signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
  4927.  02h    WORD    level (01h flat-model file, 02h multisegmented file)
  4928.  04h    WORD    header size
  4929.  06h    DWORD    file size in bytes
  4930.  0Ah    WORD    checksum
  4931.  0Ch    DWORD    offset of run-time parameters within file (see #1274)
  4932.  10h    DWORD    size of run-time parameters in bytes
  4933.  14h    DWORD    offset of relocation table within file
  4934.  18h    DWORD    size of relocation table in bytes
  4935.  1Ch    DWORD    offset of segment information table within file (see #1273)
  4936.  20h    DWORD    size of segment information table in bytes
  4937.  24h    WORD    size of segment information table entry in bytes
  4938.  26h    DWORD    offset of load image within file
  4939.  2Ah    DWORD    size of load image on disk
  4940.  2Eh    DWORD    offset of symbol table within file or 00000000h
  4941.  32h    DWORD    size of symbol table in bytes
  4942.  36h    DWORD    offset of GDT within load image
  4943.  3Ah    DWORD    size of GDT in bytes
  4944.  3Eh    DWORD    offset of LDT within load image
  4945.  42h    DWORD    size of LDT in bytes
  4946.  46h    DWORD    offset of IDT within load image
  4947.  4Ah    DWORD    size of IDT in bytes
  4948.  4Eh    DWORD    offset of TSS within load image
  4949.  52h    DWORD    size of TSS in bytes
  4950.  56h    DWORD    minimum number of extra bytes to be allocated at end of program
  4951.         (level 1 executables only)
  4952.  5Ah    DWORD    maximum number of extra bytes to be allocated at end of program
  4953.         (level 1 executables only)
  4954.  5Eh    DWORD    base load offset (level 1 executables only)
  4955.  62h    DWORD    initial ESP
  4956.  66h    WORD    initial SS
  4957.  68h    DWORD    initial EIP
  4958.  6Ch    WORD    initial CS
  4959.  6Eh    WORD    initial LDT
  4960.  70h    WORD    initial TSS
  4961.  72h    WORD    flags
  4962.         bit 0: load image is packed
  4963.         bit 1: 32-bit checksum is present
  4964.         bits 4-2: type of relocation table
  4965.  74h    DWORD    memory requirements for load image
  4966.  78h    DWORD    32-bit checksum (optional)
  4967.  7Ch    DWORD    size of stack segment in bytes
  4968.  80h 256 BYTEs    reserved (0)
  4969. SeeAlso: #1271,#1275
  4970.  
  4971. Format of Phar Lap segment information table entry:
  4972. Offset    Size    Description    (Table 1273)
  4973.  00h    WORD    selector number
  4974.  02h    WORD    flags
  4975.  04h    DWORD    base offset of selector
  4976.  08h    DWORD    minimum number of extra bytes to be allocated to the segment
  4977.  
  4978. Format of 386|DOS-Extender run-time parameters:
  4979. Offset    Size    Description    (Table 1274)
  4980.  00h  2 BYTEs    signature "DX" (44h 58h)
  4981.  02h    WORD    minimum number of real-mode params to leave free at run time
  4982.  04h    WORD    maximum number of real-mode params to leave free at run time
  4983.  06h    WORD    minimum interrupt buffer size in KB
  4984.  08h    WORD    maximum interrupt buffer size in KB
  4985.  0Ah    WORD    number of interrupt stacks
  4986.  0Ch    WORD    size in KB of each interrupt stack
  4987.  0Eh    DWORD    offset of byte past end of real-mode code and data
  4988.  12h    WORD    size in KB of call buffers
  4989.  14h    WORD    flags
  4990.         bit 0: file is virtual memory manager
  4991.         bit 1: file is a debugger
  4992.  16h    WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
  4993.  18h 104 BYTEs    reserved (0)
  4994.  
  4995. Format of Phar Lap repeat block header:
  4996. Offset    Size    Description    (Table 1275)
  4997.  00h    WORD    byte count
  4998.  02h    BYTE    repeat string length
  4999.  
  5000. Format of Borland debugging information header (following load image):
  5001. Offset    Size    Description    (Table 1276)
  5002.  00h    WORD    signature 52FBh
  5003.  02h    WORD    version ID
  5004.  04h    DWORD    size of name pool in bytes
  5005.  08h    WORD    number of names in name pool
  5006.  0Ah    WORD    number of type entries
  5007.  0Ch    WORD    number of structure members
  5008.  0Eh    WORD    number of symbols
  5009.  10h    WORD    number of global symbols
  5010.  12h    WORD    number of modules
  5011.  14h    WORD    number of locals (optional)
  5012.  16h    WORD    number of scopes in table
  5013.  18h    WORD    number of line-number entries
  5014.  1Ah    WORD    number of include files
  5015.  1Ch    WORD    number of segment records
  5016.  1Eh    WORD    number of segment/file correlations
  5017.  20h    DWORD    size of load image after removing uninitialized data and debug
  5018.           information
  5019.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  5020.           depends on program flags
  5021.  28h    BYTE    program flags
  5022.         bit 0: case-sensitive link
  5023.         bit 1: pascal overlay program
  5024.  29h    WORD    no longer used
  5025.  2Bh    WORD    size of data pool in bytes
  5026.  2Dh    BYTE    padding
  5027.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  5028.  30h    WORD    number of classes
  5029.  32h    WORD    number of parents
  5030.  34h    WORD    number of global classes (currently unused)
  5031.  36h    WORD    number of overloads (currently unused)
  5032.  38h    WORD    number of scope classes
  5033.  3Ah    WORD    number of module classes
  5034.  3Ch    WORD    number of coverage offsets
  5035.  3Eh    DWORD    offset relative to symbol base of name pool
  5036.  42h    WORD    number of browser information records
  5037.  44h    WORD    number of optimized symbol records
  5038.  46h    WORD    debugging flags
  5039.  48h  8 BYTEs    padding
  5040. Note:    additional information on the Borland debugging info may be found in
  5041.       Borland's Open Architecture Handbook
  5042. SeeAlso: #1252
  5043. --------U-214B-------------------------------
  5044. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  5045.     AH = 4Bh
  5046.     DS:DX = 0000h:0000h
  5047. Return: ES:BX -> ELRES history structure (see #1035 at AH=2Bh/CX=454Ch)
  5048.     DX = DABEh (signature, DAve BEnnett)
  5049. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  5050.       Bennett
  5051. SeeAlso: AH=2Bh/CX=454Ch
  5052. --------v-214B04-----------------------------
  5053. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  5054.     AX = 4B04h
  5055. Return: CF clear if "MG" resident
  5056.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  5057. SeeAlso: AX=4243h,AH=4Ah/BX=FFFFh,AX=4B21h
  5058. --------D-214B05-----------------------------
  5059. INT 21 - DOS 5+ - SET EXECUTION STATE
  5060.     AX = 4B05h
  5061.     DS:DX -> execution state structure (see #1277)
  5062. Return: CF clear if successful
  5063.         AX = 0000h
  5064.     CF set on error
  5065.         AX = error code (see #1332 at AH=59h/BX=0000h)
  5066. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  5067.       execution (including setting the DOS version number).     No DOS, BIOS
  5068.       or other software interrupt may be called after return from this call
  5069.       before commencement of the child process.  If DOS is running in the
  5070.       HMA, A20 is turned off on return from this call.
  5071. SeeAlso: AH=4Bh
  5072.  
  5073. Format of execution state structure:
  5074. Offset    Size    Description    (Table 1277)
  5075.  00h    WORD    reserved (00h)
  5076.  02h    WORD    type flags
  5077.         bit 0: program is an .EXE
  5078.         bit 1: program is an overlay
  5079.  04h    DWORD    pointer to ASCIZ name of program file
  5080.  08h    WORD    PSP segment of new program
  5081.  0Ah    DWORD    starting CS:IP of new program
  5082.  0Eh    DWORD    program size including PSP
  5083. --------v-214B20-----------------------------
  5084. INT 21 - VIRUS - "Holocaust"/"Telefonica" - ???
  5085.     AX = 4B20h
  5086. SeeAlso: AX=4B04h,AX=4B21h
  5087. --------v-214B21-----------------------------
  5088. INT 21 C - VIRUS - "Holocaust"/"Telefonica" - ???
  5089.     AX = 4B21h
  5090. Note:    called at completion of virus installation
  5091. SeeAlso: AX=4B04h,AX=4B20h,AX=4B25h
  5092. --------v-214B25-----------------------------
  5093. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  5094.     AX = 4B25h
  5095. Return: DI = 1234h if resident
  5096. SeeAlso: AX=4B21h,AX=4B40h
  5097. --------v-214B40-----------------------------
  5098. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  5099.     AX = 4B40h
  5100. Return: AX = 5678h if resident
  5101. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  5102. --------v-214B41-----------------------------
  5103. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  5104.     AX = 4B41h
  5105.     ???
  5106. Return: ???
  5107. SeeAlso: AX=4B40h
  5108. --------v-214B4A-----------------------------
  5109. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  5110.     AX = 4B4Ah
  5111. Return: AL = 57h if resident
  5112. SeeAlso: AX=4B40h,AX=4B4Bh
  5113. --------v-214B4B-----------------------------
  5114. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  5115.     AX = 4B4Bh
  5116. Return: CF clear if resident
  5117. SeeAlso: AX=4B4Ah,AX=4B4Dh
  5118. --------v-214B4D-----------------------------
  5119. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  5120.     AX = 4B4Dh
  5121. Return: CF clear if resident
  5122. SeeAlso: AX=4B4Ah,AX=4B50h
  5123. --------v-214B50-----------------------------
  5124. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  5125.     AX = 4B50h
  5126. Return: AX = 1234h if resident
  5127. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  5128. --------v-214B53-----------------------------
  5129. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  5130.     AX = 4B53h
  5131. Return: CF clear if resident
  5132. SeeAlso: AX=4B50h,AX=4B53h/BX=2121h,AX=4B55h
  5133. --------v-214B53BX2121-----------------------
  5134. INT 21 - VIRUS - "One Half" - INSTALLATION CHECK
  5135.     AX = 4B53h
  5136.     BX = 2121h
  5137.     CX = 1212h
  5138.     DX = 0236h
  5139. Return: AX = 454Bh if installed
  5140. SeeAlso: AX=4B50h,AX=4B53h,AX=4B55h
  5141. --------v-214B55-----------------------------
  5142. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  5143.     AX = 4B55h
  5144. Return: AX = 1231h if resident
  5145. SeeAlso: AX=4B53h,AX=4B59h
  5146. --------v-214B59-----------------------------
  5147. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  5148.     AX = 4B59h
  5149. Return: CF clear if resident
  5150. SeeAlso: AX=4B50h,AX=4B5Eh
  5151. --------v-214B5E-----------------------------
  5152. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  5153.     AX = 4B5Eh
  5154. Return: CF clear if resident
  5155. SeeAlso: AX=4B59h,AX=4B87h
  5156. --------v-214B60-----------------------------
  5157. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  5158.     AX = 4B60h
  5159.     ???
  5160. Return: ???
  5161. SeeAlso: AX=4B50h
  5162. --------O-214B80-----------------------------
  5163. INT 21 - DR-DOS v3.41 - RUN ALREADY-LOADED KERNEL FILE
  5164.     AX = 4B80h
  5165.     DS:DX -> ASCIZ name of program to EXEC
  5166.     ES = segment of PSP for kernel file
  5167. Return: only if call failed
  5168. Note:    DR-DOS uses this call after an AX=4B01h to load the kernel file into
  5169.       memory and patching the program's parent-PSP field to point at itself
  5170. SeeAlso: AH=4Bh"EXEC"
  5171. --------v-214B87-----------------------------
  5172. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  5173.     AX = 4B87h
  5174. Return: AX = 6663h if resident
  5175. SeeAlso: AX=4B5Eh,AX=4B95h
  5176. --------v-214B95-----------------------------
  5177. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  5178.     AX = 4B95h
  5179. Return: AX = 1973h if resident
  5180. SeeAlso: AX=4B87h,AX=4BA7h
  5181. --------v-214BA7-----------------------------
  5182. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  5183.     AX = 4BA7h
  5184. Return: AX = B459h if resident
  5185. SeeAlso: AX=4B95h,AX=4BAAh
  5186. --------v-214BAA-----------------------------
  5187. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  5188.     AX = 4BAAh
  5189. Return: CF clear if resident
  5190. SeeAlso: AX=4BA7h,AX=4BAFh
  5191. --------v-214BAF-----------------------------
  5192. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  5193.     AX = 4BAFh
  5194. Return: AL = AFh if "Magnitogorsk" resident
  5195.     AL = FAh if "948"/"Screenplus1" resident
  5196. SeeAlso: AX=4BAAh,AX=4BB1h"VIRUS"
  5197. --------v-214BB1-----------------------------
  5198. INT 21 - VIRUS - "UZZY" -INSTALLATION CHECK
  5199.     AX = 4BB1h
  5200. Return: CL = 04h if resident
  5201. SeeAlso: AX=4BAFh"VIRUS",AX=4BDDh"VIRUS"
  5202. --------v-214BDD-----------------------------
  5203. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  5204.     AX = 4BDDh
  5205. Return: AX = 1234h
  5206. SeeAlso: AX=4BB1h"VIRUS",AX=4BFEh
  5207. --------v-214BEE-----------------------------
  5208. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  5209.     AX = 4BEEh
  5210. Return: AX = status
  5211.         1234h grab was successful
  5212.         2345h failed (INT 21 grabbed previously)
  5213. Program: F-DRIVER.SYS is part of the shareware F-PROT virus/trojan protection
  5214.       package by Fridrik Skulason
  5215. Note:    when called the first time, this function moves the INT 21 monitoring
  5216.       code from its original location in the INT 21 chain to be the first
  5217.       thing called by INT 21.  This is the mechanism used by F-NET.
  5218. SeeAlso: INT 2F/AX=4653h/CX=0002h,INT 2F/AX=4653h/CX=0007h
  5219. --------k-214BF0-----------------------------
  5220. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  5221.     AX = 4BF0h
  5222. Return: CF clear if installed
  5223.         AX = 899Dh
  5224. Program: DIET is an executable-compression program by Teddy Matsumoto
  5225. SeeAlso: AX=37D0h,AX=4BF1h
  5226. --------k-214BF1-----------------------------
  5227. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  5228.     AX = 4BF1h
  5229. Return: ???
  5230. SeeAlso: AX=37D0h,AX=4BF0h
  5231. --------v-214BF1-----------------------------
  5232. INT 21 - VIRUS - "Jerusalem 2" - INSTALLATION CHECK
  5233.     AX = 4BF1h
  5234. Return: AX = 1FB4h if resident
  5235. SeeAlso: AH=3Fh/BX=FEB0h"VIRUS",AX=4BDDh"VIRUS",AX=4BFEh"VIRUS"
  5236. --------v-214BFE-----------------------------
  5237. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  5238.     AX = 4BFEh
  5239. Return: AX = 1234h if "Hitchcock" or "Storm" resident
  5240.     AX = ABCDh if "1193"/"Copyright" resident
  5241.     DI = 55BBh if "Dark Avenger-1028" resident
  5242. SeeAlso: AX=4BDDh,AX=4BF1h"VIRUS",AX=4BFFh"Justice"
  5243. --------v-214BFF-----------------------------
  5244. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  5245.     AX = 4BFFh
  5246. Return: BL = FFh if "USSR-707" resident
  5247.     DI = 55AAh if "Justice" resident
  5248.     AX = 1234h if "Hitchcock.1238" resident
  5249.     CF clear if "Europe 92" resident
  5250. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  5251. --------v-214BFFSI0000-----------------------
  5252. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  5253.     AX = 4BFFh
  5254.     SI = 0000h
  5255.     DI = 0000h
  5256. Return: DI = 55AAh if installed
  5257. SeeAlso: AX=4BFFh"Justice",AX=5252h
  5258. --------D-214C-------------------------------
  5259. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  5260.     AH = 4Ch
  5261.     AL = return code
  5262. Return: never returns
  5263. Notes:    unless the process is its own parent
  5264.       (see #1032 [offset 16h] at AH=26h), all open files are closed and
  5265.       all memory belonging to the process is freed
  5266.     all network file locks should be removed before calling this function
  5267. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  5268. SeeAlso: INT 60/DI=0601h
  5269. --------m-214C57-----------------------------
  5270. INT 21 - Headroom - ???
  5271.     AX = 4C57h
  5272.     DS:DX -> target address
  5273. Note:    jumps to target address instead of terminating program
  5274. SeeAlso: AX=5758h
  5275. --------D-214D-------------------------------
  5276. INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
  5277.     AH = 4Dh
  5278. Return: AH = termination type
  5279.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  5280.         01h control-C abort
  5281.         02h critical error abort
  5282.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  5283.     AL = return code
  5284. Notes:    the word in which DOS stores the return code is cleared after being
  5285.       read by this function, so the return code can only be retrieved once
  5286.     COMMAND.COM stores the return code of the last external command it
  5287.       executed as ERRORLEVEL
  5288.     this call should not be used if the child was started with AX=4B04h;
  5289.       use AH=8Ah instead
  5290.     the following sequence will close a Virtual DOS Machine under OS/2 2.0
  5291.       through OS/2 Merlin (but may change in the future):
  5292.         MOV    AH,4Dh
  5293.         INT    21h
  5294.         HLT
  5295.         DB    02h,0FDh
  5296.       This sequence is the only way to close a specific VDM which was
  5297.       booted from floppy or a disk image.
  5298. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  5299. --------D-214E-------------------------------
  5300. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  5301.     AH = 4Eh
  5302.     AL = special flag for use by APPEND (refer to note below)
  5303.     CX = file attribute mask (see #1073 at AX=4301h) (bits 0 and 5 ignored)
  5304.         0088h (Novell DOS 7) find first deleted file
  5305.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  5306. Return: CF clear if successful
  5307.         Disk Transfer Area filled with FindFirst data block (see #1278)
  5308.     CF set on error
  5309.         AX = error code (02h,03h,12h) (see #1332 at AH=59h/BX=0000h)
  5310. Notes:    for search attributes other than 08h, all files with at MOST the
  5311.       specified combination of hidden, system, and directory attributes
  5312.       will be returned.  Under DOS 2.x, searching for attribute 08h
  5313.       (volume label) will also return normal files, while under DOS 3.0+
  5314.       only the volume label (if any) will be returned.
  5315.     this call also returns successfully if given the name of a character
  5316.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  5317.       and the current date and time.  DOS 3.0+ returns attribute 40h and
  5318.       the current date and time.
  5319.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  5320.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  5321.       found pathname will be stored, otherwise, the actual found path
  5322.       will be prepended to the original filespec without a path.
  5323.     under LANtastic, this call may be used to obtain a list of a server's
  5324.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  5325.       resources may be obtained by searching for "\\SERVER\@*.*"
  5326.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  5327. BUGS:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  5328.       with a character device name (no wildcards) and search attributes
  5329.       which include the volume-label bit (08h) will fail unless there is
  5330.       an intervening DOS call which implicitly or explicity performs a
  5331.       directory search without the volume-label bit.  Such implicit
  5332.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  5333.       (AH=41h), and RENAME (AH=56h)
  5334.     DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  5335. SeeAlso: AH=11h,AH=4Fh,AX=4301h,AX=714Eh,AX=71A1h,AX=F257h/SF=02h
  5336. SeeAlso: INT 2F/AX=111Bh,INT 2F/AX=B711h
  5337.  
  5338. Format of FindFirst data block:
  5339. Offset    Size    Description    (Table 1278)
  5340. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  5341.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  5342.  01h 11 BYTEs    search template
  5343.  0Ch    BYTE    search attributes
  5344. ---DOS 2.x (and some DOS 3.x???)---
  5345.  00h    BYTE    search attributes
  5346.  01h    BYTE    drive letter
  5347.  02h 11 BYTEs    search template
  5348. ---WILDUNIX.COM---
  5349.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  5350.  0Ch    BYTE    search attributes
  5351. ---DOS 2.x and most 3.x---
  5352.  0Dh    WORD    entry count within directory
  5353.  0Fh    DWORD    pointer to DTA???
  5354.  13h    WORD    cluster number of start of parent directory
  5355. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  5356.  0Dh    WORD    entry count within directory
  5357.  0Fh    WORD    cluster number of start of parent directory
  5358.  11h  4 BYTEs    reserved
  5359. ---OS/2 MVDM---
  5360.  00h    WORD    "OS2_BMP_handle"
  5361.  02h    WORD    "OS2_LastEnt"
  5362.  04h    DWORD    "OS2_Checksum"
  5363.  08h    BYTE    "OS2_usi_flag"
  5364.  09h    DWORD    used by DOS emulator for second pass for volume-label searches
  5365.  0Dh    WORD    (ret) "DOS_LastEnt" entry count within directory
  5366.  0Fh    BYTE    OS/2 Processed-FindFirst flag
  5367.         00h FindFirst processed by DOS
  5368.         42h FindFirst processed by OS/2
  5369.  10h  5 BYTEs    reserved for future use
  5370. ---all versions, documented fields---
  5371.  15h    BYTE    attribute of file found
  5372.  16h    WORD    file time (see #1317 at AX=5700h)
  5373.  18h    WORD    file date (see #1318 at AX=5700h)
  5374.  1Ah    DWORD    file size
  5375.  1Eh 13 BYTEs    ASCIZ filename+extension
  5376. --------f-214E-------------------------------
  5377. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  5378.     AH = 4Eh
  5379.     DS:DX = 0000h:0000h
  5380. Return: AH = 99h if installed
  5381. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  5382.       Hosgood and Terry Barnaby
  5383. --------D-214F-------------------------------
  5384. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  5385.     AH = 4Fh
  5386.     Disk Transfer Area contains data block from previous FindFirst or
  5387.       FindNext call
  5388. Return: CF clear if successful
  5389.         Disk Transfer Area updated
  5390.     CF set on error
  5391.         AX = error code (12h) (see #1332 at AH=59h/BX=0000h)
  5392. Notes:    under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
  5393.       the next matching deleted file will be returned
  5394.     since the entire state of a FindFirst/FindNext sequence is contained
  5395.       in the data block in the DTA, other disk operations such as renaming,
  5396.       moving, deleting, or creating files can cause inaccurate directory
  5397.       searches, such as finding the same file twice
  5398. BUG:    DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  5399. SeeAlso: AH=12h,AH=4Eh,AX=714Fh,AX=71A1h
  5400. --------D-2150-------------------------------
  5401. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  5402.     AH = 50h
  5403.     BX = segment of PSP for new process
  5404. Notes:    DOS uses the current PSP address to determine which processes own files
  5405.       and memory; it corresponds to process identifiers used by other OSs
  5406.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5407.       handler without setting the Critical Error flag
  5408.     under MS-DOS 3.0+ and DR DOS 3.41+, this function does not use any of
  5409.       the DOS-internal stacks and may thus be called at any time, even
  5410.       during another INT 21h call
  5411.     some Microsoft applications such as Quick C 2.51 use segments of 0000h
  5412.       and FFFFh and direct access to the SDA (see #1339 at AX=5D06h) to
  5413.       test whether they are running under MS-DOS rather than a compatible
  5414.       OS; although one should only call this function with valid PSP
  5415.       addresses, any program hooking it should be prepared to handle
  5416.       invalid addresses
  5417.     this function is supported by the OS/2 compatibility box
  5418.     this call was undocumented prior to the release of DOS 5.0
  5419. SeeAlso: AH=26h,AH=51h,AH=62h
  5420. --------v-2150FD-----------------------------
  5421. INT 21 - VIRUS - "Predator 2" - INSTALLATION CHECK
  5422.     AX = 50FDh
  5423. Return: AX = FD50h if resident
  5424. SeeAlso: AX=4BFFh"VIRUS",AX=5454h"VIRUS"
  5425. --------D-2151-------------------------------
  5426. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  5427.     AH = 51h
  5428. Return: BX = segment of PSP for current process
  5429. Notes:    DOS uses the current PSP address to determine which processes own files
  5430.       and memory; it corresponds to process identifiers used by other OSs
  5431.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5432.       handler without setting the Critical Error flag
  5433.     under DOS 3.0+, this function does not use any of the DOS-internal
  5434.       stacks and may thus be called at any time, even during another
  5435.       INT 21h call
  5436.     supported by OS/2 compatibility box
  5437.     identical to the documented AH=62h
  5438.     this call was undocumented prior to the release of DOS 5.0
  5439. SeeAlso: AH=26h,AH=50h,AH=62h
  5440. --------D-2152-------------------------------
  5441. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  5442.     AH = 52h
  5443. Return: ES:BX -> DOS list of lists (see #1279)
  5444. Notes:    partially supported by OS/2 v1.1 compatibility box (however, most
  5445.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  5446.       pointer is FFFFh:FFFFh).
  5447.     partially supported by the Windows NT DOS box; contains only a
  5448.       rudimentary Current Directory Structure (see #1297)
  5449.     on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
  5450.     Quarterdeck's suggested check for the use of its DOSDATA.SYS or
  5451.       DOS-UP.SYS is to test whether the list-of-lists segment is greater
  5452.       than the segment of the first memory block; a better check for
  5453.       DOS-UP.SYS is INT 21/AX=2B01h/CX=444Dh
  5454.     because not all DOS workalikes support all fields in the List of Lists,
  5455.       applications should ensure that pointers are neither 0000h:0000h
  5456.       nor FFFFh:FFFFh before using them
  5457.     Windows for Workgroups 3.11 network and Windows95 set the path to
  5458.       the local drive and directory even for network drives; in that
  5459.       case the UNC form \\SERVER\SHARE can be obtained with
  5460.       INT 21/AX=5F02h or INT 21/AX=5F46h. LapLink RemoteAccess does the
  5461.       same even for INT 21/AX=5F02h
  5462.     Windows95 GUI no longer returns the true path for a SUBSTed drive,
  5463.       but MS-DOS 7.00 does; use INT 21/AH=60h to obtain the true name
  5464. SeeAlso: INT 2F/AX=1203h
  5465.  
  5466. Format of List of Lists:
  5467. Offset    Size    Description    (Table 1279)
  5468.  -24    WORD    (DOS 3.1+) contents of CX from INT 21/AX=5E01h
  5469.  -22    WORD    (DOS ???+) LRU counter for FCB caching
  5470.  -20    WORD    (DOS ???+) LRU counter for FCB opens
  5471.  -18    DWORD    (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
  5472.             FFFFh:FFFFh if not installed or not available
  5473.  -14    WORD    (DOS ???+) offset in DOS CS of code to return from INT 21 call
  5474.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  5475.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  5476.  -8    DWORD    (DOS 3.0+) pointer to current disk buffer
  5477.  -4    WORD    (DOS 3.0+) pointer in DOS data segment of unread CON input
  5478.         when CON is read via a handle, DOS reads an entire line,
  5479.           and returns the requested portion, buffering the rest
  5480.           for the next read.  0000h indicates no unread input
  5481.  -2    WORD    segment of first memory control block (see #1280)
  5482.  00h    DWORD    pointer to first Drive Parameter Block (see #1049 at AH=32h)
  5483.  04h    DWORD    -> first System File Table (see #1291,#1292,#1293,#1294)
  5484.  08h    DWORD    pointer to active CLOCK$ device's header (most recently loaded
  5485.           driver with CLOCK bit set)
  5486.  0Ch    DWORD    pointer to active CON device's header (most recently loaded
  5487.           driver with STDIN bit set)
  5488. ---DOS 2.x---
  5489.  10h    BYTE    number of logical drives in system
  5490.  11h    WORD    maximum bytes/block of any block device
  5491.  13h    DWORD    pointer to first disk buffer (see #1301,#1302)
  5492.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5493.         NUL is always the first device on DOS's linked list of device
  5494.           drivers. (see #1298)
  5495. ---DOS 3.0---
  5496.  10h    BYTE    number of block devices
  5497.  11h    WORD    maximum bytes/block of any block device
  5498.  13h    DWORD    pointer to first disk buffer (see #1302,#1304)
  5499.  17h    DWORD    pointer to array of current directory structures (see #1295)
  5500.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  5501.  1Ch    DWORD    pointer to STRING= workspace area
  5502.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  5503.  22h    DWORD    pointer to FCB table
  5504.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  5505.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5506.         NUL is always the first device on DOS's linked list of device
  5507.           drivers. (see #1298)
  5508. ---DOS 3.1-3.3---
  5509.  10h    WORD    maximum bytes per sector of any block device
  5510.  12h    DWORD    pointer to first disk buffer in buffer chain (see #1302)
  5511.  16h    DWORD    pointer to array of current directory structures (see #1295)
  5512.  1Ah    DWORD    pointer to system FCB tables (see #1292,#1293,#1294)
  5513.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5514.  20h    BYTE    number of block devices installed
  5515.  21h    BYTE    number of available drive letters (largest of 5, installed
  5516.           block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5517.           current directory structure array.
  5518.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5519.         NUL is always the first device on DOS's linked list of device
  5520.           drivers. (see #1298)
  5521.  34h    BYTE    number of JOIN'ed drives
  5522. ---DOS 4.x---
  5523.  10h    WORD    maximum bytes per sector of any block device
  5524.  12h    DWORD    pointer to disk buffer info record (see #1304,#1305)
  5525.         Note: although the initialization code in IO.SYS uses this
  5526.           pointer, MSDOS.SYS does not, instead using the hardcoded
  5527.           address of the info record
  5528.  16h    DWORD    pointer to array of current directory structures
  5529.         (see #1295,#1296)
  5530.  1Ah    DWORD    pointer to system FCB tables (see #1292,#1293,#1294)
  5531.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5532.         (always 00h for DOS 5.0)
  5533.  20h    BYTE    number of block devices installed
  5534.  21h    BYTE    number of available drive letters (largest of 5, installed
  5535.           block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5536.           current directory structure array.
  5537.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5538.         NUL is always the first device on DOS's linked list of device
  5539.           drivers. (see #1298)
  5540.  34h    BYTE    number of JOIN'ed drives
  5541.  35h    WORD    pointer within IBMDOS code segment to list of special program
  5542.           names (see #1314)
  5543.         (always 0000h for DOS 5.0)
  5544.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  5545.         (see #1310)
  5546.         may be called by any IFS driver which does not wish to
  5547.           service functions 20h or 24h-28h itself
  5548.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  5549.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  5550.  41h    WORD    number of lookahead buffers (the y in BUFFERS x,y)
  5551.  43h    BYTE    boot drive (1=A:)
  5552.  44h    BYTE    flag: 01h to use DWORD moves (80386+), 00h otherwise
  5553.  45h    WORD    extended memory size in KB
  5554. ---DOS 5.0-6.0---
  5555.  10h 39 BYTEs    as for DOS 4.x (above)
  5556.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  5557.  3Bh    WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
  5558.           when executing special .COM format
  5559.  3Dh    WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
  5560.         used for maintaining count of INT 21 calls which disable A20
  5561.           on return
  5562.  3Fh  8 BYTEs    as for DOS 4.x (above)
  5563. ---Windows NT DOS Box---
  5564.  10h  6 BYTEs    ???
  5565.  16h    DWORD    pointer to array of current directory structures (see #1297)
  5566.  1Ah  6 BYTEs    ???
  5567.  20h    BYTE    number of block devices installed
  5568.  21h    BYTE    number of local drive letters (= installed block devices)
  5569.         Also size of current directory structure array.
  5570.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5571.         NUL is always the first device on DOS's linked list of device
  5572.           drivers. (see #1298)
  5573.  
  5574. Format of DOS memory control block:
  5575. Offset    Size    Description    (Table 1280)
  5576.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5577.  01h    WORD    PSP segment of owner or special flag value (see #1281)
  5578.  03h    WORD    size of memory block in paragraphs
  5579.  05h  3 BYTEs    unused by MS-DOS
  5580.         (386MAX) if locked-out block, region start/prev region end
  5581. ---DOS 2.x,3.x---
  5582.  08h  8 BYTEs    unused
  5583. ---DOS 4.0+ ---
  5584.  08h  8 BYTEs    ASCII program name if PSP memory block or DR DOS UMB,
  5585.           else garbage
  5586.         null-terminated if less than 8 characters
  5587. Notes:    the next MCB is at segment (current + size + 1)
  5588.     under DOS 3.1+, the first memory block is the DOS data segment,
  5589.       containing installable drivers, buffers, etc.     Under DOS 4.0+ it is
  5590.       divided into subsegments, each with its own memory control block
  5591.       (see #1285), the first of which is at offset 0000h.
  5592.     for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
  5593.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  5594.       "SD" is system data, device drivers, etc.
  5595.     Some versions of DR DOS use only seven characters of the program name,
  5596.       placing a NUL in the eighth byte.
  5597. SeeAlso: #1282,#1284,#1285
  5598.  
  5599. (Table 1281)
  5600. Values for special flag PSP segments:
  5601.  0000h    free
  5602.  0006h    DR DOS XMS UMB
  5603.  0007h    DR DOS excluded upper memory ("hole")
  5604.  0008h    belongs to DOS
  5605.  FFF7h    386MAX v6.01+ ???
  5606.  FFFAh    386MAX UMB control block (see #1130 at AX=4402h"386MAX")
  5607.  FFFDh    386MAX locked-out memory
  5608.  FFFEh    386MAX UMB (normally immediately follows its control block)
  5609.  FFFFh    386MAX v6.01+ device driver
  5610.  
  5611. Format of MS-DOS 5+ UMB control block:
  5612. Offset    Size    Description    (Table 1282)
  5613.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  5614.  01h    WORD    first available paragraph in UMB if control block at start
  5615.           of UMB, 000Ah if control block at end of UMB
  5616.  03h    WORD    length in paragraphs of following UMB or locked-out region
  5617.  05h  3 BYTEs    unused
  5618.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  5619. SeeAlso: #1280,#1283
  5620.  
  5621. Format of MS-DOS 7.0 HMA memory control block:
  5622. Offset    Size    Description    (Table 1283)
  5623.  00h    WORD    signature "MS" (4Dh 53h)
  5624.  02h    WORD    usage flag???
  5625.         0000h free
  5626.         else ???
  5627.  04h    WORD    size of memory block in bytes (not counting MCB)
  5628.  06h    WORD    offset of next memory block in HMA or 0000h
  5629.  08h  8 BYTEs    unused (0)
  5630. SeeAlso: #1280,#1282,#1284
  5631.  
  5632. Format of STARLITE (General Software's Embedded DOS) memory control block:
  5633. Offset    Size    Description    (Table 1284)
  5634.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5635.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  5636.  03h    WORD    size of memory block in paragraphs
  5637.  05h    BYTE    unused
  5638.  06h    WORD    segment address of next memory control block (0000h if last)
  5639.  08h    WORD    segment address of previous memory control block or 0000h
  5640.  0Ah  6 BYTEs    reserved
  5641.  
  5642. Format of DOS 4.0+ data segment subsegment control blocks:
  5643. Offset    Size    Description    (Table 1285)
  5644.  00h    BYTE    subsegment type (blocks typically appear in this order)
  5645.         "D"  device driver
  5646.         "E"  device driver appendage
  5647.         "I"  IFS (Installable File System) driver
  5648.              (MS-DOS 7) high-loaded drive data table array (see #2257)
  5649.         "F"  FILES=  control block storage area (for FILES>5)
  5650.         "X"  FCBS=   control block storage area, if present
  5651.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  5652.         "B"  BUFFERS=  storage area
  5653.         "L"  LASTDRIVE=     current directory structure array storage area
  5654.         "S"  STACKS=  code and data area, if present (see #1286,#1287)
  5655.         "T"  INSTALL= transient code
  5656.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  5657.  03h    WORD    size of subsegment in paragraphs
  5658.  05h  3 BYTEs    unused
  5659.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  5660.           was loaded (unused for other types)
  5661.  
  5662. Format of data at start of STACKS code segment (if present):
  5663. Offset    Size    Description    (Table 1286)
  5664.  00h    WORD    ???
  5665.  02h    WORD    number of stacks (the x in STACKS=x,y)
  5666.  04h    WORD    size of stack control block array (should be 8*x)
  5667.  06h    WORD    size of each stack (the y in STACKS=x,y)
  5668.  08h    DWORD    pointer to STACKS data segment
  5669.  0Ch    WORD    offset in STACKS data segment of stack control block array
  5670.  0Eh    WORD    offset in STACKS data segment of last element of that array
  5671.  10h    WORD    offset in STACKS data segment of the entry in that array for
  5672.           the next stack to be allocated (initially same as value in
  5673.           0Eh and works its way down in steps of 8 to the value in
  5674.           0Ch as hardware interrupts pre-empt each other)
  5675. Note:    the STACKS code segment data may, if present, be located as follows:
  5676.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  5677.           in the IBMBIO segment (seen at 0070:0190h)
  5678.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  5679.           segment, which may be determined by inspecting the segment
  5680.           pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  5681.           70h, 72-77h which have not been redirected by device drivers
  5682.           or TSRs.
  5683.     DOS 4.0+    Identified by sub-segment control block type "S" within the DOS
  5684.           data segment.
  5685. SeeAlso: #1288,INT B4"STACKMAN"
  5686.  
  5687. Format of array elements in STACKS data segment:
  5688. Offset    Size    Description    (Table 1287)
  5689.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  5690.           higher stack.
  5691.  01h    BYTE    not used
  5692.  02h    WORD    previous SP
  5693.  04h    WORD    previous SS
  5694.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  5695.           top of the stack is preset to point back to this control
  5696.           block.
  5697.  
  5698. Format of SHARE.EXE hooks (DOS 3.1-6.00):
  5699. Offset    Size    Description    (Table 1288)
  5700. (offsets from first system file table--pointed at by ListOfLists+04h)
  5701. -3Ch    DWORD    pointer to FAR routine for ???
  5702.         Note: not called by MS-DOS 3.3, set to 0000h:0000h by
  5703.             SHARE 3.3+
  5704. -38h    DWORD    pointer to FAR routine called on opening file
  5705.         on call, internal DOS location points at filename
  5706.           (see #1339 at AX=5D06h)
  5707.         Return: CF clear if successful
  5708.             CF set on error
  5709.                 AX = DOS error code (24h)
  5710.                   (see #1332 at AH=59h/BX=0000h)
  5711.         Note: SHARE directly accesses DOS-internal data to get name of
  5712.             file just opened
  5713. -34h    DWORD    pointer to FAR routine called on closing file
  5714.         ES:DI -> system file table
  5715.         Note: does something to every Record Lock Record for file
  5716. -30h    DWORD    pointer to FAR routine to close all files for given computer
  5717.         (called by AX=5D03h)
  5718. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  5719.         (called by AX=5D04h)
  5720. -28h    DWORD    pointer to FAR routine to close file by name
  5721.         (called by AX=5D02h)
  5722.         DS:SI -> DOS parameter list (see #1338 at AX=5D00h)
  5723.            DPL's DS:DX -> name of file to close
  5724.         Return: CF clear if successful
  5725.             CF set on error
  5726.                 AX = DOS error code (03h)
  5727.                   (see #1332 at AH=59h/BX=0000h)
  5728. -24h    DWORD    pointer to FAR routine to lock region of file
  5729.         call with BX = file handle
  5730.               ---DOS 3.x---
  5731.               CX:DX = starting offset
  5732.               SI:AX = size
  5733.               ---DOS 4.0+ ---
  5734.               DS:DX -> lock range
  5735.                     DWORD start offset
  5736.                     DWORD size in bytes
  5737.         Return: CF set on error
  5738.                 AL = DOS error code (21h) (see #1332 at AH=59h)
  5739.         Note: not called if file is marked as remote
  5740. -20h    DWORD    pointer to FAR routine to unlock region of file
  5741.         call with BX = file handle
  5742.               ---DOS 3.x---
  5743.               CX:DX = starting offset
  5744.               SI:AX = size
  5745.               ---DOS 4.0+ ---
  5746.               DS:DX -> lock range
  5747.                     DWORD start offset
  5748.                     DWORD size in bytes
  5749.         Return: CF set on error
  5750.                 AL = DOS error code (21h) (see #1332 at AH=59h)
  5751.         Note: not called if file is marked as remote
  5752. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  5753.         call with ES:DI -> system file table entry for file
  5754.             CX = length of region from current position in file
  5755.         Return: CF set if any portion of region locked
  5756.                 AX = 0021h
  5757. -18h    DWORD    pointer to FAR routine to get open file list entry
  5758.         (called by AX=5D05h)
  5759.         call with DS:SI -> DOS parameter list (see #1338 at AX=5D00h)
  5760.             DPL's BX = index of sharing record
  5761.             DPL's CX = index of SFT in SFT chain of sharing rec
  5762.         Return: CF set on error or not loaded
  5763.                 AX = DOS error code (12h) (see #1332 at AH=59h)
  5764.             CF clear if successful
  5765.                 ES:DI -> filename
  5766.                 CX = number of locks owned by specified SFT
  5767.                 BX = network machine number
  5768.                 DX destroyed
  5769. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  5770.         call with DS:SI -> unopened FCB
  5771.               ES:DI -> system file table entry
  5772.         Return: BL = C0h???
  5773.         Note: copies following fields from SFT to FCB:
  5774.            starting cluster of file      0Bh     1Ah
  5775.            sharing record offset      33h     1Ch
  5776.            file attribute          04h     1Eh
  5777. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  5778.         call with ES:DI -> system file table entry
  5779.               DS:SI -> FCB
  5780.         Return: CF set if SFT closed or sharing record offsets
  5781.                 mismatched
  5782.             CF clear if successful
  5783.                 BX = starting cluster number from FCB
  5784. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  5785.         DS:SI -> system file table
  5786.         Return: AX = number of handle in JFT which already uses SFT
  5787.         Note: called during open/create of a file
  5788.         Note: if SFT was opened with inheritance enabled and sharing
  5789.             mode 111, does something to all other SFTs owned by
  5790.             same process which have the same file open mode and
  5791.             sharing record
  5792. -08h    DWORD    pointer to FAR routine for closing file
  5793.         Note: closes various handles referring to file most-recently
  5794.             opened
  5795. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  5796.           entries
  5797.         call with ES:DI -> system file table entry for file (see #1293)
  5798.               AX = subfunction (apply to each related SFT)
  5799.                 00h: update time stamp (offset 0Dh) and date
  5800.                      stamp (offset 0Fh)
  5801.                 01h: update file size (offset 11h) and starting
  5802.                      cluster (offset 0Bh).  Sets last-accessed
  5803.                      cluster fields to start of file if file
  5804.                      never accessed
  5805.                 02h: as function 01h, but last-accessed fields
  5806.                      always changed
  5807.                 03h: do both functions 00h and 02h
  5808.         Note: follows ptr at offset 2Bh in system file table entries
  5809.         Note: NOP if opened with no-inherit or via FCB
  5810. Notes:    most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
  5811.       either that SS=DOS DS or SS=DS=DOS DS and directly access
  5812.       DOS-internal data
  5813.     sharing hooks are not supported by DR DOS 5-6; they appear to be
  5814.       supported by Novell DOS 7, with a segment of 0000h indicating the
  5815.       DOS data segment
  5816. SeeAlso: #1289,#1290
  5817.  
  5818. Format of sharing record:
  5819. Offset    Size    Description    (Table 1289)
  5820.  00h    BYTE    flag
  5821.         00h free block
  5822.         01h allocated block
  5823.         FFh end marker
  5824.  01h    WORD    size of block
  5825.  03h    BYTE    checksum of pathname (including NUL)
  5826.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  5827.  04h    WORD    offset in SHARE's DS of first Record Lock Record (see #1290)
  5828.  06h    DWORD    pointer to start of system file table chain for file
  5829.  0Ah    WORD    unique sequence number
  5830.  0Ch    var    ASCIZ full pathname
  5831. Note:    not supported by DR DOS SHARE 1.1 and 2.0; will reportedly be
  5832.       supported by Novell DOS 7
  5833. SeeAlso: #1288,#1290
  5834.  
  5835. Format of SHARE.EXE Record Lock Record:
  5836. Offset    Size    Description    (Table 1290)
  5837.  00h    WORD    offset in SHARE's DS of next lock table in list or 0000h
  5838.  02h    DWORD    offset in file of start of locked region
  5839.  06h    DWORD    offset in file of end of locked region
  5840.  0Ah    DWORD    pointer to System File Table entry for this file
  5841.  0Eh    WORD    PSP segment of lock's owner
  5842. ---DOS 5+ ---
  5843.  10h    WORD    lock type: (00h lock all, 01h lock writes only)
  5844. SeeAlso: #1288,#1289,#1291,#1294
  5845.  
  5846. Format of DOS 2.x system file tables:
  5847. Offset    Size    Description    (Table 1291)
  5848.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5849.  04h    WORD    number of files in this table
  5850.  06h  28h bytes per file
  5851.     Offset    Size    Description
  5852.      00h    BYTE    number of file handles referring to this file
  5853.      01h    BYTE    file open mode (see #1056 at AH=3Dh)
  5854.      02h    BYTE    file attribute
  5855.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  5856.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  5857.      0Fh    WORD    ???
  5858.      11h    WORD    ???
  5859.      13h    DWORD    file size???
  5860.      17h    WORD    file date in packed format (see #1318 at AX=5700h)
  5861.      19h    WORD    file time in packed format (see #1317 at AX=5700h)
  5862.      1Bh    BYTE    device attribute (see #1076 at AX=4400h)
  5863.     ---character device---
  5864.      1Ch    DWORD    pointer to device driver
  5865.     ---block device---
  5866.      1Ch    WORD    starting cluster of file
  5867.      1Eh    WORD    relative cluster in file of last cluster accessed
  5868.     ------
  5869.      20h    WORD    absolute cluster number of current cluster
  5870.      22h    WORD    ???
  5871.      24h    DWORD    current file position???
  5872. SeeAlso: #1292,#1293,#1294
  5873.  
  5874. Format of DOS 3.0 system file tables and FCB tables:
  5875. Offset    Size    Description    (Table 1292)
  5876.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5877.  04h    WORD    number of files in this table
  5878.  06h  38h bytes per file
  5879.     Offset    Size    Description
  5880.      00h-1Eh as for DOS 3.1+ (see #1293)
  5881.      1Fh    WORD    byte offset of directory entry within sector
  5882.      21h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  5883.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  5884.      30h    WORD    (SHARE.EXE) network machine number which opened file
  5885.             (Windows Enhanced mode DOSMGR uses the virtual machine
  5886.               ID as the machine number; see INT 2F/AX=1683h)
  5887.      32h    WORD    PSP segment of file's owner (first three entries for
  5888.               AUX/CON/PRN contain segment of IO.SYS startup code)
  5889.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  5890.      36h    WORD    ??? apparently always 0000h
  5891. SeeAlso: #1291,#1293,#1294
  5892.  
  5893. Format of DOS 3.1-3.3x, DR DOS 5.0-6.0 system file tables and FCB tables:
  5894. Offset    Size    Description    (Table 1293)
  5895.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5896.  04h    WORD    number of files in this table
  5897.  06h  35h bytes per file
  5898.     Offset    Size    Description
  5899.      00h    WORD    number of file handles referring to this file
  5900.      02h    WORD    file open mode (see AX=6C00h, #1056 at AH=3Dh)
  5901.             bit 15 set if this file opened via FCB
  5902.      04h    BYTE    file attribute (see #1073 at AX=4301h)
  5903.      05h    WORD    device info word (see #1076 at AX=4400h)
  5904.             bit 15 set if remote file
  5905.             bit 14 set means do not set file date/time on closing
  5906.             bit 12 set means don't inherit on EXEC
  5907.             bits 5-0 drive number for disk files
  5908.      07h    DWORD    pointer to device driver header if character device
  5909.             else pointer to DOS Drive Parameter Block
  5910.               (see #1049 at AH=32h)
  5911.      0Bh    WORD    starting cluster of file
  5912.      0Dh    WORD    file time in packed format (see #1317 at AX=5700h)
  5913.             not used for character devices in DR DOS
  5914.      0Fh    WORD    file date in packed format (see #1318 at AX=5700h)
  5915.             not used for character devices in DR DOS
  5916.      11h    DWORD    file size
  5917.     ---system file table---
  5918.      15h    DWORD    current offset in file (may be larger than size of
  5919.               file; INT 21/AH=42h does not check new position)
  5920.     ---FCB table---
  5921.      15h    WORD    counter for last I/O to FCB
  5922.      17h    WORD    counter for last open of FCB
  5923.             (these are separate to determine the times of the
  5924.               latest I/O and open)
  5925.     ---
  5926.      19h    WORD    relative cluster within file of last cluster accessed
  5927.      1Bh    WORD    absolute cluster number of last cluster accessed
  5928.             0000h if file never read or written???
  5929.      1Dh    WORD    number of sector containing directory entry
  5930.             (see #1007)
  5931.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  5932.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  5933.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  5934.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  5935.             (Windows Enhanced mode DOSMGR uses the virtual machine
  5936.               ID as the machine number; see INT 2F/AX=1683h)
  5937.      31h    WORD    PSP segment of file's owner (see #1032 at AH=26h)
  5938.               (first three entries for AUX/CON/PRN contain segment
  5939.               of IO.SYS startup code)
  5940.      33h    WORD    offset within SHARE.EXE code segment of
  5941.               sharing record (see #1289) 0000h = none
  5942. SeeAlso: #1291,#1292,#1294
  5943.  
  5944. Format of DOS 4.0-6.0 system file tables and FCB tables:
  5945. Offset    Size    Description    (Table 1294)
  5946.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5947.  04h    WORD    number of files in this table
  5948.  06h  3Bh bytes per file
  5949.     Offset    Size    Description
  5950.      00h    WORD    number of file handles referring to this file
  5951.             FFFFh if in use but not referenced
  5952.      02h    WORD    file open mode (see AX=6C00h,#1056 at AH=3Dh)
  5953.             bit 15 set if this file opened via FCB
  5954.      04h    BYTE    file attribute (see #1073 at AX=4301h)
  5955.      05h    WORD    device info word (see also #1076 at AX=4400h)
  5956.             bit 15 set if remote file
  5957.             bit 14 set means do not set file date/time on closing
  5958.             bit 13 set if named pipe
  5959.             bit 12 set if no inherit
  5960.             bit 11 set if network spooler
  5961.             bit 7  set if device, clear if file (only if local)
  5962.             bits 6-0 as for AX=4400h
  5963.      07h    DWORD    pointer to device driver header if character device
  5964.             else pointer to DOS Drive Parameter Block
  5965.               (see #1049 at AH=32h) or REDIR data
  5966.      0Bh    WORD    starting cluster of file (local files only)
  5967.      0Dh    WORD    file time in packed format (see #1317)
  5968.      0Fh    WORD    file date in packed format (see #1318)
  5969.      11h    DWORD    file size
  5970.      15h    DWORD    current offset in file (SFT)
  5971.             LRU counters (FCB table, two WORDs)
  5972.     ---local file---
  5973.      19h    WORD    relative cluster within file of last cluster accessed
  5974.      1Bh    DWORD    number of sector containing directory entry
  5975.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  5976.     ---network redirector---
  5977.      19h    DWORD    pointer to REDIRIFS record
  5978.      1Dh  3 BYTEs    ???
  5979.     ------
  5980.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  5981.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  5982.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  5983.             (Windows Enhanced mode DOSMGR uses the virtual machine
  5984.               ID as the machine number; see INT 2F/AX=1683h)
  5985.      31h    WORD    PSP segment of file's owner (see #1032 at AH=26h)
  5986.               (first three entries for AUX/CON/PRN contain segment
  5987.               of IO.SYS startup code)
  5988.      33h    WORD    offset within SHARE.EXE code segment of
  5989.             sharing record (see #1247)  0000h = none
  5990.      35h    WORD    (local) absolute cluster number of last clustr accessed
  5991.             (redirector) ???
  5992.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  5993. Note:    the OS/2 2.0 DOS Boot Session does not properly fill in the filename
  5994.       field due to incomplete support for SFTs; the OS/2 2.0 DOS Window
  5995.       does not appear to support SFTs at all
  5996. SeeAlso: #1291,#1292,#1293
  5997.  
  5998. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  5999. Offset    Size    Description    (Table 1295)
  6000.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or UNC form
  6001.           \\SERVER\PATH (network, see notes below)
  6002.  43h    WORD    drive attributes (also see note below) (see also AX=5F07h)
  6003.         bit 15: uses network redirector     \ invalid if 00, installable
  6004.         bit 14: physical drive         / file system if 11
  6005.         bit 13: JOIN'ed      \ path above is true path that would be
  6006.         bit 12: SUBST'ed  / needed if not under SUBST or JOIN
  6007.         bit  7: remote drive hidden from redirector's assign-list and
  6008.               exempt from network connection make/break commands;
  6009.               set for CD-ROM drives by MSCDEX (not supported by
  6010.               CORELCDX)
  6011.  45h    DWORD    pointer to Drive Parameter Block for drive
  6012.           (see #1049 at AH=32h)
  6013. ---local drives---
  6014.  49h    WORD    starting cluster of current directory
  6015.         0000h = root, FFFFh = never accessed
  6016.  4Bh    WORD    ??? seems to be FFFFh always
  6017.  4Dh    WORD    ??? seems to be FFFFh always
  6018. ---network drives---
  6019.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  6020.         (DOS 4 only) available for use by IFS driver
  6021.  4Dh    WORD    stored user data from INT 21/AX=5F03h
  6022. ------
  6023.  4Fh    WORD    offset in current directory path of backslash corresponding to
  6024.           root directory for drive
  6025.         this value specifies how many characters to hide from the
  6026.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  6027.           drive letter and colon, SUBST, JOIN, and networks change it
  6028.           so that only the appropriate portion of the true path is
  6029.           visible to the user
  6030. ---DOS 4.0+ ---
  6031.  51h    BYTE    (DOS 4 only, remote drives) device type
  6032.         04h network drive
  6033.  52h    DWORD    pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
  6034.           this drive, 00000000h if native DOS
  6035.  56h    WORD    available for use by IFS driver
  6036. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  6037.       after JOIN x: /D in DR DOS 5.0 or NET USE x: /D in older LAN versions
  6038.     normally, only one of bits 13&12 may be set together with bit 14, but
  6039.       DR DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  6040.       0001 SUBST, 0101 ASSIGN (see #1296)
  6041.     Windows for Workgroups 3.11 network sets the path to the local
  6042.       drive and directory even for network drives; in that case the
  6043.       UNC form \\SERVER\SHARE can be obtained with INT 21/AX=5F02h
  6044.       or INT 21/AX=5F46h. LapLink RemoteAccess does the same even for
  6045.       INT 21/AX=5F02h
  6046.     SoftWindows on the Macintosh PowerPC sets \\E for the host drive
  6047. SeeAlso: #1296,INT 21/AX=71AAh/BL=00h
  6048.  
  6049. Format of DR DOS 5.0-6.0 current directory structure entry (array):
  6050. Offset    Size    Description    (Table 1296)
  6051.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  6052.  43h    WORD    drive attributes
  6053.         1000h SUBSTed drive
  6054.         3000h??? JOINed drive
  6055.         4000h physical drive
  6056.         5000h ASSIGNed drive
  6057.         7000h JOINed drive
  6058.         8000h network drive
  6059.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  6060.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  6061.  47h    WORD    cluster number of start of parent directory (0000h = root)
  6062.  49h    WORD    entry number of current directory in parent directory
  6063.  4Bh    WORD    cluster number of start of current directory
  6064.  4Dh    WORD    used for media change detection (details not available)
  6065.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  6066.         0000h if physical root directory
  6067. SeeAlso: #1295
  6068.  
  6069. Format of Windows NT Current Directory Structure (CDS) (array):
  6070. Offset    Size    Description    (Table 1297)
  6071.  00h 67 BYTEs    ASCIZ path in form X:\ (does not show either current directory
  6072.           or network path)
  6073.  43h  4 BYTEs    ???
  6074. Note:    the WinNT CDS contains only as many entries as there are local drives,
  6075.       not LASTDRIVE entries.
  6076.  
  6077. Format of DOS device driver header:
  6078. Offset    Size    Description    (Table 1298)
  6079.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  6080.  04h    WORD    device attributes (see #1299,#1300)
  6081.  06h    WORD    device strategy entry point
  6082.         call with ES:BX -> request header
  6083.           (see #2251 at INT 2F/AX=0802h)
  6084.  08h    WORD    device interrupt entry point
  6085. ---character device---
  6086.  0Ah  8 BYTEs    blank-padded character device name
  6087. ---block device---
  6088.  0Ah    BYTE    number of subunits (drives) supported by driver
  6089.  0Bh  7 BYTEs    normally unused; sometimes contains signature to indicate
  6090.           specific drivers:
  6091.         "$PCMATA"   PCMCIA driver PCMATA.SYS (see AX=440Dh"DOS 3.2+")
  6092.         "AHADDVR"   Adaptec SCSI disk driver ASPIDISK.SYS
  6093.         "DBLSPAC"   MS DoubleSpace or DriveSpace
  6094.         "DSKREET"   NortonUtils v5+ Diskreet (see INT 2F/AX=FE00h)
  6095.         "GFS    "   LapLink III device driver DD.BIN
  6096.         "SIDExxx"   PCMCIA driver ATADRV.EXE (see AX=440Dh"DOS 3.2+")
  6097.         "STAC-CD"   Stacker/Stacker Anywhere (see AX=4404h"Stacker")
  6098. ---DoubleSpace/DriveSpace---
  6099.  12h  2 BYTEs    signature ",." (2Ch 2Eh)
  6100.  14h    var    preloading API entry point
  6101. ---CD-ROM---
  6102.  12h    WORD    reserved, must be 0000h
  6103.         appears to be another device chain
  6104.  14h    BYTE    drive letter (must initially be 00h; this byte is set by
  6105.           MSCDEX when it loads)
  6106.  15h    BYTE    number of units
  6107.  16h  6 BYTEs    signature 'MSCDnn' where 'nn' is version (currently '00')
  6108. SeeAlso: #2205 at INT 25/AX=CDCDh,#2492 at INT 2F/AX=5600h
  6109.  
  6110. Bitfields for device attributes (character device):
  6111. Bit(s)    Description    (Table 1299)
  6112.  15    set (indicates character device)
  6113.  14    IOCTL supported (see AH=44h)
  6114.  13    (DOS 3.0+) output until busy supported
  6115.  12    reserved
  6116.  11    (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
  6117.  10-8    reserved
  6118.  7    (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
  6119.     (see AX=4410h,AX=4411h)
  6120.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  6121.     (see AX=440Ch,AX=440Dh"DOS 3.2+")
  6122.  5    reserved
  6123.  4    device is special (use INT 29 "fast console output")
  6124.  3    device is CLOCK$ (all reads/writes use transfer record described
  6125.       below)
  6126.  2    device is NUL
  6127.  1    device is standard output
  6128.  0    device is standard input
  6129. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  6130.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  6131.       010 = European DOS 4.0)
  6132. SeeAlso: #1300,#1298
  6133.  
  6134. Bitfields for device attributes (block device):
  6135. Bit(s)    Description    (Table 1300)
  6136.  15    clear (indicates block device)
  6137.  14    IOCTL supported
  6138.  13    non-IBM format
  6139.  12    network device (device is remote)
  6140.  11    (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
  6141.  10    reserved
  6142.  9    direct I/O not allowed??? (set by DOS 3.3 DRIVER.SYS for "new" drives)
  6143.  8    ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  6144.  7    (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
  6145.     (see AX=4410h,AX=4411h)
  6146.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  6147.     implies support for commands 17h and 18h
  6148.       (see AX=440Ch,AX=440Dh"DOS 3.2+",AX=440Eh,AX=440Fh)
  6149.  5-2    reserved
  6150.  1    driver supports 32-bit sector addressing (DOS 3.31+)
  6151.  0     reserved
  6152. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  6153.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  6154.       010 = European DOS 4.0)
  6155. SeeAlso: #1299,#1298
  6156.  
  6157. Format of DOS 2.x disk buffer:
  6158. Offset    Size    Description    (Table 1301)
  6159.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6160.         least-recently used buffer is first in chain
  6161.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  6162.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  6163.  08h    WORD    logical sector number
  6164.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  6165.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  6166.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see #1049 at AH=32h)
  6167.  10h        buffered data
  6168. SeeAlso: #1302,#1304,#1305,#1307
  6169.  
  6170. Format of DOS 3.x disk buffer:
  6171. Offset    Size    Description    (Table 1302)
  6172.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6173.         least-recently used buffer is first in chain
  6174.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6175.  05h    BYTE    buffer flags (see #1303)
  6176.  06h    WORD    logical sector number
  6177.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  6178.  09h    BYTE    sector offset between copies if multiple copies to be written
  6179.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see #1049 at AH=32h)
  6180.  0Eh    WORD    unused??? (almost always 0)
  6181.  10h        buffered data
  6182. SeeAlso: #1301,#1304,#1305,#1307
  6183.  
  6184. Bitfields for DOS 3.x disk buffer flags:
  6185. Bit(s)    Description    (Table 1303)
  6186.  7    ???
  6187.  6    buffer dirty
  6188.  5    buffer has been referenced
  6189.  4    ???
  6190.  3    sector in data area
  6191.  2    sector in a directory, either root or subdirectory
  6192.  1    sector in FAT
  6193.  0    boot sector??? (guess)
  6194. SeeAlso: #1308
  6195.  
  6196. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  6197. Offset    Size    Description    (Table 1304)
  6198.  00h    DWORD    pointer to array of disk buffer hash chain heads (see #1306)
  6199.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6200.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6201.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6202.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  6203.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  6204.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  6205.  11h    WORD    ??? seems always to be 0001h
  6206.  13h    WORD    segment of EMS physical page frame
  6207.  15h    WORD    ??? seems always to be zero
  6208.  17h  4 WORDs    EMS partial page mapping information???
  6209. SeeAlso: #1301,#1302,#1305,#1309
  6210.  
  6211. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  6212. Offset    Size    Description    (Table 1305)
  6213.  00h    DWORD    pointer to array of disk buffer hash chain heads (see #1306)
  6214.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6215.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6216.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6217.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  6218.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  6219.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  6220.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  6221.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  6222.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  6223.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  6224.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  6225.           into EMS
  6226.  18h    WORD    EMS handle for buffers, zero if not in EMS
  6227.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  6228.  1Ch    WORD    ??? appears always to be 0001h
  6229.  1Eh    WORD    segment of EMS physical page frame
  6230.  20h    WORD    ??? appears always to be zero
  6231.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  6232. SeeAlso: #1301,#1302,#1304,#1309
  6233.  
  6234. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  6235. Offset    Size    Description    (Table 1306)
  6236.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  6237.           in EMS
  6238.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  6239.           this chain are in the same segment.
  6240.  06h    BYTE    number of dirty buffers on this chain
  6241.  07h    BYTE    reserved (00h)
  6242. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  6243.       address modulo NDBCH,     0 <= N <= NDBCH-1
  6244.     each chain resides completely within one EMS page
  6245.     this structure is in main memory even if buffers are in EMS
  6246.  
  6247. Format of DOS 4.0-6.0 disk buffer:
  6248. Offset    Size    Description    (Table 1307)
  6249.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  6250.  02h    WORD    backward pointer, offset only
  6251.  04h    BYTE    drive (0=A,1=B, etc) if bit 7 clear
  6252.         SFT index if bit 7 set
  6253.         FFh if not in use
  6254.  05h    BYTE    buffer flags (see #1308)
  6255.  06h    DWORD    logical sector number (local buffers only)
  6256.  0Ah    BYTE    number of copies to write
  6257.         for FAT sectors, same as number of FATs
  6258.         for data and directory sectors, usually 1
  6259.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  6260.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see #1049 at AH=32h)
  6261.  11h    WORD    size of data in buffer if remote buffer (see also #1308)
  6262.  13h    BYTE    reserved (padding)
  6263.  14h        buffered data
  6264. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  6265.       (computed as the sum of high and low words of the logical sector
  6266.       number divided by the number of disk buffer chains) are on the same
  6267.       doubly-linked circular chain; for DOS 5+, only a single circular
  6268.       chain exists.
  6269.     the links consist of offset addresses only, the segment being the same
  6270.       for all buffers in the chain.
  6271. SeeAlso: #1301,#1302,#1304
  6272.  
  6273. Bitfields for DOS 4.0-6.0 disk buffer flags:
  6274. Bit(s)    Description    (Table 1308)
  6275.  7    remote buffer
  6276.  6    buffer dirty
  6277.  5    buffer has been referenced (reserved in DOS 5+)
  6278.  4    search data buffer (only valid if remote buffer)
  6279.  3    sector in data area
  6280.  2    sector in a directory, either root or subdirectory
  6281.  1    sector in FAT
  6282.  0    reserved
  6283. SeeAlso: #1303
  6284.  
  6285. Format of DOS 5.0-6.0 disk buffer info:
  6286. Offset    Size    Description    (Table 1309)
  6287.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  6288.         (see #1307)
  6289.  04h    WORD    number of dirty disk buffers
  6290.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6291.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6292.  0Ch    BYTE    buffer location
  6293.         00h base memory, no workspace buffer
  6294.         01h HMA, workspace buffer in base memory
  6295.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  6296.  11h  3 BYTEs    unused
  6297.  14h    WORD    ???
  6298.  16h    BYTE    flag: INT 24 fail while making an I/O status call
  6299.  17h    BYTE    temp storage for user memory allocation strategy during EXEC
  6300.  18h    BYTE    counter: number of INT 21 calls for which A20 is off
  6301.  19h    BYTE    bit flags
  6302.         bit 0: ???
  6303.         bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
  6304.             WINA20.SYS when MS Windows 3.0 starts)
  6305.         bit 2: in EXEC state (INT 21/AX=4B05h)
  6306.  1Ah    WORD    offset of unpack code start (used only during INT 21/AX=4B05h)
  6307.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  6308.  1Dh    WORD    minimum paragraphs of memory required by program being EXECed
  6309.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  6310.           memory chain in base 640K only (first UMB MCB usually at
  6311.           9FFFh, locking out video memory with a DOS-owned memory
  6312.           block)
  6313.         the MCB this word points at contains a valid link into high
  6314.           memory even if it is marked with a 'Z' indicating the last
  6315.           memory block
  6316.  21h    WORD    paragraph from which to start scanning during memory allocation
  6317. SeeAlso: #1304,#1305
  6318.  
  6319. (Table 1310)
  6320. Call IFS utility function entry point with:
  6321.     AH = 20h miscellaneous functions
  6322.         AL = 00h get date
  6323.         Return: CX = year
  6324.             DH = month
  6325.             DL = day
  6326.         AL = 01h get process ID and computer ID
  6327.         Return: BX = current PSP segment
  6328.             DX = active network machine number
  6329.         AL = 05h get file system info
  6330.         ES:DI -> 16-byte info buffer
  6331.         Return: buffer filled
  6332.             Offset    Size    Description
  6333.              00h  2 BYTEs    unused
  6334.              02h    WORD    number of SFTs (actually counts only
  6335.                     the first two file table arrays)
  6336.              04h    WORD    number of FCB table entries
  6337.              06h    WORD    number of proctected FCBs
  6338.              08h  6 BYTEs    unused
  6339.              0Eh    WORD    largest sector size supported
  6340.         AL = 06h get machine name
  6341.         ES:DI -> 18-byte buffer for name
  6342.         Return: buffer filled with name starting at offset 02h
  6343.         AL = 08h get sharing retry count
  6344.         Return: BX = sharing retry count
  6345.         AL = other
  6346.         Return: CF set
  6347.     AH = 21h get redirection state
  6348.         BH = type (03h disk, 04h printer)
  6349.         Return: BH = state (00h off, 01h on)
  6350.     AH = 22h ??? some sort of time calculation
  6351.         AL = 00h ???
  6352.             nonzero ???
  6353.     AH = 23h ??? some sort of time calculation
  6354.     AH = 24h compare filenames
  6355.         DS:SI -> first ASCIZ filename
  6356.         ES:DI -> second ASCIZ filename
  6357.         Return: ZF set if files are same ignoring case and / vs \
  6358.     AH = 25h normalize filename
  6359.         DS:SI -> ASCIZ filename
  6360.         ES:DI -> buffer for result
  6361.         Return: filename uppercased, forward slashes changed to backslashes
  6362.     AH = 26h get DOS stack
  6363.         Return: DS:SI -> top of stack
  6364.             CX = size of stack in bytes
  6365.     AH = 27h increment InDOS flag
  6366.     AH = 28h decrement InDOS flag
  6367. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  6368.       pass them on to the default handler pointed at by [LoL+37h]
  6369. SeeAlso: #1311,#1312
  6370.  
  6371. Format of IFS driver list:
  6372. Offset    Size    Description    (Table 1311)
  6373.  00h    DWORD    pointer to next driver header
  6374.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  6375.  0Ch  4 BYTEs    ???
  6376.  10h    DWORD    pointer to IFS utility function entry point (see #1310)
  6377.         call with ES:BX -> IFS request (see #1312)
  6378.  14h    WORD    offset in header's segment of driver entry point
  6379.     ???
  6380. SeeAlso: #1310,#1312
  6381.  
  6382. Format of IFS request block:
  6383. Offset    Size    Description    (Table 1312)
  6384.  00h    WORD    total size in bytes of request
  6385.  02h    BYTE    class of request
  6386.         02h ???
  6387.         03h redirection
  6388.         04h ???
  6389.         05h file access
  6390.         06h convert error code to string
  6391.         07h ???
  6392.  03h    WORD    returned DOS error code
  6393.  05h    BYTE    IFS driver exit status
  6394.         00h success
  6395.         01h ???
  6396.         02h ???
  6397.         03h ???
  6398.         04h ???
  6399.         FFh internal failure
  6400.  06h 16 BYTEs    ???
  6401. ---request class 02h---
  6402.  16h    BYTE    function code
  6403.         04h ???
  6404.  17h    BYTE    unused???
  6405.  18h    DWORD    pointer to ???
  6406.  1Ch    DWORD    pointer to ???
  6407.  20h  2 BYTEs    ???
  6408. ---request class 03h---
  6409.  16h    BYTE    function code
  6410.  17h    BYTE    ???
  6411.  18h    DWORD    pointer to ???
  6412.  1Ch    DWORD    pointer to ???
  6413.  22h    WORD    returned ???
  6414.  24h    WORD    returned ???
  6415.  26h    WORD    returned ???
  6416.  28h    BYTE    returned ???
  6417.  29h    BYTE    unused???
  6418. ---request class 04h---
  6419.  16h    DWORD    pointer to ???
  6420.  1Ah    DWORD    pointer to ???
  6421. ---request class 05h---
  6422.  16h    BYTE    function code
  6423.         01h flush disk buffers
  6424.         02h get disk space
  6425.         03h MKDIR
  6426.         04h RMDIR
  6427.         05h CHDIR
  6428.         06h delete file
  6429.         07h rename file
  6430.         08h search directory
  6431.         09h file open/create
  6432.         0Ah LSEEK
  6433.         0Bh read from file
  6434.         0Ch write to file
  6435.         0Dh lock region of file
  6436.         0Eh commit/close file
  6437.         0Fh get/set file attributes
  6438.         10h printer control
  6439.         11h ???
  6440.         12h process termination
  6441.         13h ???
  6442.     ---class 05h function 01h---
  6443.      17h  7 BYTEs    ???
  6444.      1Eh    DWORD    pointer to ???
  6445.      22h  4 BYTEs    ???
  6446.      26h    BYTE    ???
  6447.      27h    BYTE    ???
  6448.     ---class 05h function 02h---
  6449.      17h  7 BYTEs    ???
  6450.      1Eh    DWORD    pointer to ???
  6451.      22h  4 BYTEs    ???
  6452.      26h    WORD    returned total clusters
  6453.      28h    WORD    returned sectors per cluster
  6454.      2Ah    WORD    returned bytes per sector
  6455.      2Ch    WORD    returned available clusters
  6456.      2Eh    BYTE    returned ???
  6457.      2Fh    BYTE    ???
  6458.     ---class 05h functions 03h,04h,05h---
  6459.      17h  7 BYTEs    ???
  6460.      1Eh    DWORD    pointer to ???
  6461.      22h  4 BYTEs    ???
  6462.      26h    DWORD    pointer to directory name
  6463.     ---class 05h function 06h---
  6464.      17h  7 BYTEs    ???
  6465.      1Eh    DWORD    pointer to ???
  6466.      22h  4 BYTEs    ???
  6467.      26h    WORD    attribute mask
  6468.      28h    DWORD    pointer to filename
  6469.     ---class 05h function 07h---
  6470.      17h  7 BYTEs    ???
  6471.      1Eh    DWORD    pointer to ???
  6472.      22h  4 BYTEs    ???
  6473.      26h    WORD    attribute mask
  6474.      28h    DWORD    pointer to source filespec
  6475.      2Ch    DWORD    pointer to destination filespec
  6476.     ---class 05h function 08h---
  6477.      17h  7 BYTEs    ???
  6478.      1Eh    DWORD    pointer to ???
  6479.      22h  4 BYTEs    ???
  6480.      26h    BYTE    00h FINDFIRST
  6481.             01h FINDNEXT
  6482.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  6483.      2Ch    WORD    search attribute if FINDFIRST
  6484.      2Eh    DWORD    pointer to filespec if FINDFIRST
  6485.     ---class 05h function 09h---
  6486.      17h  7 BYTEs    ???
  6487.      1Eh    DWORD    pointer to ???
  6488.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6489.      26h    WORD    ???  \ together, specify open vs. create, whether or
  6490.      28h    WORD    ???  / not to truncate
  6491.      2Ah  4 BYTEs    ???
  6492.      2Eh    DWORD    pointer to filename
  6493.      32h  4 BYTEs    ???
  6494.      36h    WORD    file attributes on call
  6495.             returned ???
  6496.      38h    WORD    returned ???
  6497.     ---class 05h function 0Ah---
  6498.      17h  7 BYTEs    ???
  6499.      1Eh    DWORD    pointer to ???
  6500.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6501.      26h    BYTE    seek type (02h = from end)
  6502.      28h    DWORD    offset on call
  6503.             returned new absolute position
  6504.     ---class 05h functions 0Bh,0Ch---
  6505.      17h  7 BYTEs    ???
  6506.      1Eh    DWORD    pointer to ???
  6507.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6508.      28h    WORD    number of bytes to transfer
  6509.             returned bytes actually transferred
  6510.      2Ah    DWORD    transfer address
  6511.     ---class 05h function 0Dh---
  6512.      17h  7 BYTEs    ???
  6513.      1Eh    DWORD    pointer to ???
  6514.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6515.      26h    BYTE    file handle???
  6516.      27h    BYTE    unused???
  6517.      28h    WORD    ???
  6518.      2Ah    WORD    ???
  6519.      2Ch    WORD    ???
  6520.      2Eh    WORD    ???
  6521.     ---class 05h function 0Eh---
  6522.      17h  7 BYTEs    ???
  6523.      1Eh    DWORD    pointer to ???
  6524.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6525.      26h    BYTE    00h commit file
  6526.             01h close file
  6527.      27h    BYTE    unused???
  6528.     ---class 05h function 0Fh---
  6529.      17h  7 BYTEs    ???
  6530.      1Eh    DWORD    pointer to ???
  6531.      22h  4 BYTEs    ???
  6532.      26h    BYTE    02h GET attributes
  6533.             03h PUT attributes
  6534.      27h    BYTE    unused???
  6535.      28h 12 BYTEs    ???
  6536.      34h    WORD    search attributes???
  6537.      36h    DWORD    pointer to filename
  6538.      3Ah    WORD    (GET) returned ???
  6539.      3Ch    WORD    (GET) returned ???
  6540.      3Eh    WORD    (GET) returned ???
  6541.      40h    WORD    (GET) returned ???
  6542.      42h    WORD    (PUT) new attributes
  6543.             (GET) returned attributes
  6544.     ---class 05h function 10h---
  6545.      17h  7 BYTEs    ???
  6546.      1Eh    DWORD    pointer to ???
  6547.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6548.      26h    WORD    ???
  6549.      28h    DWORD    pointer to ???
  6550.      2Ch    WORD    ???
  6551.      2Eh    BYTE    ???
  6552.      2Fh    BYTE    subfunction
  6553.             01h get printer setup
  6554.             03h ???
  6555.             04h ???
  6556.             05h ???
  6557.             06h ???
  6558.             07h ???
  6559.             21h set printer setup
  6560.     ---class 05h function 11h---
  6561.      17h  7 BYTEs    ???
  6562.      1Eh    DWORD    pointer to ???
  6563.      22h    DWORD    pointer to IFS open file structure (see #1313)
  6564.      26h    BYTE    subfunction
  6565.      27h    BYTE    unused???
  6566.      28h    WORD    ???
  6567.      2Ah    WORD    ???
  6568.      2Ch    WORD    ???
  6569.      2Eh    BYTE    ???
  6570.      2Fh    BYTE    ???
  6571.     ---class 05h function 12h---
  6572.      17h 15 BYTEs    unused???
  6573.      26h    WORD    PSP segment
  6574.      28h    BYTE    type of process termination
  6575.      29h    BYTE    unused???
  6576.     ---class 05h function 13h---
  6577.      17h 15 BYTEs    unused???
  6578.      26h    WORD    PSP segment
  6579. ---request class 06h---
  6580.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  6581.  1Ah    BYTE    returned ???
  6582.  1Bh    BYTE    unused
  6583. ---request class 07h---
  6584.  16h    DWORD    pointer to IFS open file structure (see #1313)
  6585.  1Ah    BYTE    ???
  6586.  1Bh    BYTE    unused???
  6587. SeeAlso: #1311,#1310,#1313
  6588.  
  6589. Format of IFS open file structure:
  6590. Offset    Size    Description    (Table 1313)
  6591.  00h    WORD    ???
  6592.  02h    WORD    device info word
  6593.  04h    WORD    file open mode
  6594.  06h    WORD    ???
  6595.  08h    WORD    file attributes
  6596.  0Ah    WORD    owner's network machine number
  6597.  0Ch    WORD    owner's PSP segment
  6598.  0Eh    DWORD    file size
  6599.  12h    DWORD    current offset in file
  6600.  16h    WORD    file time
  6601.  18h    WORD    file date
  6602.  1Ah 11 BYTEs    filename in FCB format
  6603.  25h    WORD    ???
  6604.  27h    WORD    hash value of SFT address
  6605.         (low word of linear address + segment&F000h)
  6606.  29h  3 WORDs    network info from SFT
  6607.  2Fh    WORD    ???
  6608.  
  6609. Format of one item in DOS 4.0+ list of special program names:
  6610. Offset    Size    Description    (Table 1314)
  6611.  00h    BYTE    length of name (00h = end of list)
  6612.  01h  N BYTEs    name in format name.ext
  6613.  N    2 BYTEs    DOS version to return for program (major,minor)
  6614.         (see AH=30h,INT 2F/AX=122Fh)
  6615. ---DOS 4 only---
  6616.  N+2    BYTE    number of times to return fake version number (FFh = always)
  6617. Note:    if the name of the executable for the program making the DOS "get
  6618.       version" call matches one of the names in this list, DOS returns the
  6619.       specified version rather than the true version number
  6620. --------v-215252-----------------------------
  6621. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  6622.     AX = 5252h
  6623. Return: BX = FFEEh if resident
  6624. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  6625. --------D-2153-------------------------------
  6626. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  6627.     AH = 53h
  6628.     DS:SI -> BIOS Parameter Block (see #1315)
  6629.     ES:BP -> buffer for Drive Parameter Block (see #1049 at AH=32h)
  6630. Return: ES:BP buffer filled
  6631. Notes:    for DOS 3.0+, the cluster at which to start searching is set to 0000h
  6632.       and the number of free clusters is set to FFFFh (unknown)
  6633.     if the number of sectors per cluster is set to zero, MS-DOS will hang
  6634.       at startup because it computes the internally-used shift count by
  6635.       shifting this value right until the carry flag is set; since this
  6636.       will never happen when the field is zero, MS-DOS hangs
  6637.     not supported by Windows NT 3.1
  6638.  
  6639. Format of BIOS Parameter Block:
  6640. Offset    Size    Description    (Table 1315)
  6641.  00h    WORD    number of bytes per sector
  6642.  02h    BYTE    number of sectors per cluster
  6643.  03h    WORD    number of reserved sectors at start of disk
  6644.  05h    BYTE    number of FATs
  6645.  06h    WORD    number of entries in root directory
  6646.  08h    WORD    total number of sectors
  6647.         for DOS 4.0+, set to zero if partition >32M, then set DWORD at
  6648.           15h to actual number of sectors
  6649.  0Ah    BYTE    media ID byte (see #1010)
  6650.  0Bh    WORD    number of sectors per FAT
  6651. ---DOS 2.13---
  6652.  0Dh    WORD    number of sectors per track
  6653.  0Fh    WORD    number of heads
  6654.  11h    WORD    number of hidden sectors
  6655. ---DOS 3.0+ ---
  6656.  0Dh    WORD    number of sectors per track
  6657.  0Fh    WORD    number of heads
  6658.  11h    DWORD    number of hidden sectors
  6659.  15h 11 BYTEs    reserved
  6660. ---DOS 4.0+ ---
  6661.  15h    DWORD    total number of sectors if word at 08h contains zero
  6662.  19h  6 BYTEs    ???
  6663.  1Fh    WORD    number of cylinders
  6664.  21h    BYTE    device type
  6665.  22h    WORD    device attributes (removable or not, etc)
  6666. ---DR DOS 5+ ---
  6667.  15h    DWORD    total number of sectors if word at 08h contains zero
  6668.  19h  6 BYTEs    reserved
  6669. ---European MS-DOS 4.00---
  6670.  15h    DWORD    total number of sectors if word at 08h contains zero
  6671.         (however, this DOS does not actually implement >32M partitions)
  6672. SeeAlso: #1049,#1316
  6673.  
  6674. Format of Extended BIOS Parameter Block:
  6675. Offset    Size    Description    (Table 1316)
  6676.  00h 25 BYTEs    same as standard DOS 4-6 BPB (see #1315)
  6677.  19h    DWORD    sectors per FAT if WORD at 0Bh is 0000h
  6678.  1Dh    WORD    extended flags
  6679.         bits 3-0: the 0-based FAT number of the active FAT
  6680.         bits 6-4: reserved (0)
  6681.         bit 7: do not mirror active FAT to inactive FATs
  6682.  1Fh    WORD    file system version (high byte=major, low byte=minor)
  6683.  21h    DWORD    starting cluster number of root directory
  6684.  25h    WORD    file system information sector number (see also #1441)
  6685.  29h  6 WORDs    reserved
  6686. SeeAlso: #1213
  6687. --------D-2154-------------------------------
  6688. INT 21 - DOS 2+ - GET VERIFY FLAG
  6689.     AH = 54h
  6690. Return: AL = verify flag
  6691.         00h off
  6692.         01h on (all disk writes verified after writing)
  6693. SeeAlso: AH=2Eh
  6694. --------v-2154--BX4475-----------------------
  6695. INT 21 - VIRUS - "Dual_GtM"/"Ganeu" - INSTALLATION CHECK
  6696.     AH = 54h
  6697.     BX = 4475h ("Du")
  6698.     CX = 616Ch ("al")
  6699. Return: BX = 4774h ("Gt") and CX = 4D21h ("M!") if resident
  6700. SeeAlso: AX=50FDh"VIRUS",AX=5454h"VIRUS"
  6701. --------v-215454-----------------------------
  6702. INT 21 - VIRUS - "Dudley" - INSTALLATION CHECK
  6703.     AX = 5454h
  6704. Return: AX = 0000h if resident
  6705. SeeAlso: AX=50FDh"VIRUS",AH=54h/BX=4475h"VIRUS",AX=7BCEh"VIRUS"
  6706. --------D-2155-------------------------------
  6707. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  6708.     AH = 55h
  6709.     DX = segment at which to create new PSP
  6710.     SI = (DOS 3.0+) value to place in memory size field at DX:[0002h]
  6711. Return: AL destroyed
  6712. Notes:    creates a "child" PSP rather than making an exact copy of the current
  6713.       PSP; the new PSP's parent pointer is set to the current PSP and the
  6714.       reference count for each inherited file is incremented
  6715.     (DOS 2.0+) sets current PSP to DX
  6716.     (DOS 3.0+) marks "no inherit" file handles as closed in child PSP
  6717.     this function is implemented using the same code as AH=26h, so unlike
  6718.       other DOS 2+ functions, it does not return status in CF, instead
  6719.       returning status in AL as DOS 1.x functions do (but it never puts an
  6720.       explicit return value in AL)
  6721. SeeAlso: AH=26h,AH=50h
  6722. --------D-2156-------------------------------
  6723. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  6724.     AH = 56h
  6725.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  6726.     ES:DI -> ASCIZ new filename (no wildcards)
  6727.     CL = attribute mask (server call only, see below)
  6728. Return: CF clear if successful
  6729.     CF set on error
  6730.         AX = error code (02h,03h,05h,11h) (see #1332)
  6731. Notes:    allows move between directories on same logical volume
  6732.     this function does not set the archive attribute
  6733.       (see #1073 at AX=4301h), which results in incremental backups not
  6734.       backing up the file under its new name
  6735.     open files should not be renamed
  6736.     (DOS 2.x only) this function renames file by creating a new directory
  6737.       entry with the new name,then marking the old entry deleted
  6738.     (DOS 3.0+) allows renaming of directories
  6739.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  6740.       error 12h (no more files) is returned on success, and both source and
  6741.       destination specs must be canonical (as returned by AH=60h).
  6742.       Wildcards in the destination are replaced by the corresponding char
  6743.       of each source file being renamed.  Under DOS 3.x, the call will fail
  6744.       if the destination wildcard is *.* or equivalent; under DR DOS 5.0,
  6745.       the call will fail if any wildcards are used.     When invoked via
  6746.       AX=5D00h, only those files matching the attribute mask in CL are
  6747.       renamed.
  6748.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  6749.       and the new-name pointer is in ES:EDI (DS must equal ES)
  6750. BUG:    (DR DOS 3.41) when invoked via AX=5D00h, this function will generate
  6751.       a new directory entry with the new name (including any wildcards)
  6752.       which can only be removed with a sector editor
  6753. SeeAlso: AH=17h,AX=4301h,AX=5D00h,AH=60h,AH=71h,AX=F257h/SF=04h
  6754. --------v-215643------------------------
  6755. INT 21 - VIRUS - "PS-MPC.Gold" - INSTALLATION CHECK
  6756.     AX = 5643h  ('VC')
  6757. Return: AX = 5053h  ('PS') if resident
  6758. SeeAlso: AX=33E0h"VIRUS",AX=5741h"VIRUS",AX=6303h"VIRUS"
  6759. --------D-215700-----------------------------
  6760. INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
  6761.     AX = 5700h
  6762.     BX = file handle
  6763. Return: CF clear if successful
  6764.         CX = file's time (see #1317)
  6765.         DX = file's date (see #1318)
  6766.     CF set on error
  6767.         AX = error code (01h,06h) (see #1332)
  6768. Note:    under DR DOS 3.41 and 5.0, this function returns 0 (no date/time) for
  6769.       character devices; MS-DOS returns date and time of opening
  6770. SeeAlso: AX=5701h,AX=5704h"Windows95"
  6771.  
  6772. Bitfields for file time:
  6773. Bit(s)    Description    (Table 1317)
  6774.  15-11    hours (0-23)
  6775.  10-5    minutes
  6776.  4-0    seconds/2
  6777.  
  6778. Bitfields for file date:
  6779. Bit(s)    Description    (Table 1318)
  6780.  15-9    year - 1980
  6781.  8-5    month
  6782.  4-0    day
  6783. --------D-215701-----------------------------
  6784. INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
  6785.     AX = 5701h
  6786.     BX = file handle
  6787.     CX = new time (see #1317)
  6788.     DX = new date (see #1318)
  6789. Return: CF clear if successful
  6790.     CF set on error
  6791.         AX = error code (01h,06h) (see #1332)
  6792. SeeAlso: AX=5700h,AX=5705h"Windows95",AX=5707h"Windows95"
  6793. --------D-215702-----------------------------
  6794. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
  6795.     AX = 5702h
  6796.     BX = file handle
  6797.     CX = size of result buffer or 0000h
  6798.     DS:SI -> EAP list (see #1319)
  6799.     ES:DI -> buffer for returned EAV list (see #1322)
  6800. Return: CF clear if successful
  6801.         CX = size of returned data
  6802.     CF set on error
  6803.         AX = error code (see #1332)
  6804. Desc:    get the current value of one or more extended attributes
  6805. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  6806.       returned, only the amount of data which is available
  6807.     the default DOS 4 behavior is to return a single word of 0000h (no
  6808.       structures) in the result buffer if CX>=0002h on entry; this
  6809.       functionality was apparently never released to the public
  6810. SeeAlso: AX=5703h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  6811.  
  6812. Format of EAP (extended attribute properties) list:
  6813. Offset    Size    Description    (Table 1319)
  6814.  00h    WORD    number of EAP structures following
  6815.  02h    var    array of EAP structures (see #1320)
  6816. SeeAlso: #1322
  6817.  
  6818. Format of EAP (extended attribute property) structure:
  6819. Offset    Size    Description    (Table 1320)
  6820.  00h    BYTE    attribute type
  6821.         01h boolean (either 00h or 01h)
  6822.         02h number (BYTE, WORD, or DWORD)
  6823.         03h string
  6824.         04h date stamp
  6825.         05h time stamp
  6826.  01h    WORD    EAP flags (see #1321)
  6827.  03h    BYTE    size of reference string (name)
  6828.  04h  N BYTEs    reference string
  6829.  
  6830. Bitfields for EAP flags:
  6831. Bit(s)    Description    (Table 1321)
  6832.  12    unchangeable
  6833.  13    ignore
  6834.  14    unchangeable
  6835.  15    used by COMMAND.COM for code page, but not understood by ATTRIB
  6836.  
  6837. Format of EAV (extended attribute value) list:
  6838. Offset    Size    Description    (Table 1322)
  6839.  00h    WORD    number of EAV structures following
  6840.  02h    var    array of Extended Attribute Value structures (see #1323)
  6841. SeeAlso: #1319
  6842.  
  6843. Format of Extended Attribute Value structures:
  6844. Offset    Size    Description    (Table 1323)
  6845.  00h  4 BYTEs    ???
  6846.  04h    BYTE    size of reference string
  6847.  05h    WORD    size of value
  6848.  07h    var    reference string
  6849.     var    value
  6850. --------O-215702-----------------------------
  6851. INT 21 - OS/2 v1.1+ Family API - DosQFileInfo
  6852.     AX = 5702h
  6853.     BX = file handle
  6854.     CX = size of buffer for information
  6855.     DX = level of information
  6856.         0001h standard file information (see #1324)
  6857.         0002h Query EA Size (see #1324)
  6858.         0003h Query EAs from List (see #1325)
  6859.         0004h Query All EAs (see #1325)
  6860.     ES:DI -> buffer for information (see #1324,#1325)
  6861. Return: CF clear if successful
  6862.     CF set on error
  6863.         AX = error code
  6864. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2",AH=6Dh"OS/2"
  6865.  
  6866. Format of OS/2 DosQFileInfo:
  6867. Offset    Size    Description    (Table 1324)
  6868.  00h    WORD    creation date
  6869.  02h    WORD    creation time
  6870.  04h    WORD    last access date
  6871.  06h    WORD    last access time
  6872.  08h    WORD    last write date
  6873.  0Ah    WORD    last write time
  6874.  0Ch    DWORD    file size in bytes
  6875.  10h    DWORD    allocated space in bytes
  6876.  14h    WORD    file attributes
  6877. ---level 2 only---
  6878.  16h    DWORD    size of Extended Attributes in byte
  6879. SeeAlso: #1325,#1328
  6880.  
  6881. Format of OS/2 DosQFileInfo, EAOP structure:
  6882. Offset    Size    Description    (Table 1325)
  6883.  00h    DWORD    pointer to general EA list (see #1326)
  6884.  04h    DWORD    pointer to buffer for full EA list, with length field set
  6885.  08h    DWORD    (ret) error
  6886. Note:    for info level 3, the first pointer must contain the address of a
  6887.       list of the Extended Attributes to be retrieved; for info level 4,
  6888.       it should be 0000h:0000h
  6889. SeeAlso: #1324,#1328
  6890.  
  6891. Format of OS/2 DosQFileInfo, General EA List:
  6892. Offset    Size    Description    (Table 1326)
  6893.  00h    DWORD    (call) total size of list in bytes (including this field)
  6894.         (ret) number of bytes actually used (including this field)
  6895.  04h    var    Extended Attribute entries (see #1327) [packed arrray]
  6896.  
  6897. Format of OS/2 DosQFileInfo, General EA entry:
  6898. Offset    Size    Description    (Table 1327)
  6899.  00h    BYTE    length of Extended Attribute name (excluding terminating NUL)
  6900.  01h  N BYTEs    EA name
  6901.     BYTE    00h
  6902. SeeAlso: #1326
  6903.  
  6904. Format of OS/2 DosQFileInfo, Full EA List:
  6905. Offset    Size    Description    (Table 1328)
  6906.  00h    DWORD    (call) total size of list in bytes (including this field)
  6907.         (ret) number of bytes actually used (including this field)
  6908.  04h    var    Extended Attribute data (see #1329) [packed array]
  6909. SeeAlso: #1324,#1325
  6910.  
  6911. Format of OS/2 Extended Attribute data (struct FEA):
  6912. Offset    Size    Description    (Table 1329)
  6913.  00h    BYTE    flags
  6914.         bit 7: critical EA
  6915.  01h    BYTE    length of Extended Attribute name (excluding terminating NUL)
  6916.  02h    WORD    length of Extended Attribute value
  6917.  04h  N BYTEs    EA name
  6918.     BYTE    00h
  6919.       M BYTEs    EA value
  6920. --------O-215702BXFFFF-----------------------
  6921. INT 21 - OS/2 v1.1+ Compatibility Box Family API - DosQPathInfo
  6922.     AX = 5702h
  6923.     BX = FFFFh
  6924.     CX = size of buffer for information
  6925.     DX = level of information (0002h)
  6926.     DS:SI -> filename
  6927.     ES:DI -> buffer for FAPI path information (see #1330)
  6928. Return: CF clear if successful
  6929.         AL = 00h
  6930.     CF set on error
  6931.         AX = error code
  6932. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  6933.  
  6934. Format of FAPI path information:
  6935. Offset    Size    Description    (Table 1330)
  6936.  00h 22 BYTEs    ???
  6937.  16h    DWORD    extended attribute size (none present if less than 5)
  6938. --------D-215703-----------------------------
  6939. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
  6940.     AX = 5703h
  6941.     BX = file handle
  6942.     CX = size of result buffer or 0000h
  6943.     ES:DI -> result buffer
  6944. Return: CF clear if successful
  6945.         CX = size of returned data
  6946.     CF set on error
  6947.         AX = error code (see #1332)
  6948.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  6949. Desc:    get a list of the extended attributes which are defined for the
  6950.       specified file
  6951. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  6952.       returned, only the amount of data which is available
  6953.     the default DOS 4 behavior is to return a trivial EAP list consisting
  6954.       of the single word 0000h (no EAP structures) if CX>=0002h on entry;
  6955.       this functionality was apparently never released to the public
  6956. SeeAlso: AX=5702h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  6957. --------O-215703-----------------------------
  6958. INT 21 - OS/2 v1.1+ Family API - DosSetFileInfo
  6959.     AX = 5703h
  6960.     BX = file handle
  6961.     CX = size of information buffer
  6962.     DX = level of information
  6963.     ES:DI -> information buffer
  6964. Return: CF clear if successful
  6965.     CF set on error
  6966.         AX = error code
  6967. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  6968. --------O-215703BXFFFF-----------------------
  6969. INT 21 - OS/2 v1.1+ Family API - DosSetPathInfo
  6970.     AX = 5703h
  6971.     BX = FFFFh
  6972.     CX = size of information buffer
  6973.     DX = level of information
  6974.     DS:SI -> filename
  6975.     ES:DI -> information buffer
  6976. Return: CF clear if successful
  6977.     CF set on error
  6978.         AX = error code
  6979. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  6980. --------D-215704-----------------------------
  6981. INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
  6982.     AX = 5704h
  6983.     BX = file handle
  6984.     ES:DI -> EAV list (see #1322)
  6985. Return: CF clear if successful
  6986.     CF set on error
  6987.         AX = error code (see #1332)
  6988. Note:    the default DOS 4 behavior is to do nothing and return successfully;
  6989.       this functionality was apparently never released to the public
  6990. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  6991. --------D-215704-----------------------------
  6992. INT 21 - MS-DOS 7/Windows95 - GET LAST ACCESS DATE AND TIME
  6993.     AX = 5704h
  6994.     BX = file handle
  6995. Return: CF clear if successful
  6996.         DX = last access date (see #1318)
  6997.         CX = last access time (currently always 0000h)
  6998.     CF set on error
  6999.         AX = error code
  7000. SeeAlso: AX=5701h,AX=5705h,AX=5706h
  7001. --------D-215705-----------------------------
  7002. INT 21 - MS-DOS 7/Windows95 - SET LAST ACCESS DATE AND TIME
  7003.     AX = 5705h
  7004.     BX = file handle
  7005.     CX = new last-access time (currently not supported, must be 0000h)
  7006.     DX = new last-access date (see #1318)
  7007. Return: CF clear if successful
  7008.     CF set on error
  7009.         AX = error code
  7010. SeeAlso: AX=5700h,AX=5704h"Windows95",AX=5707h
  7011. --------D-215706-----------------------------
  7012. INT 21 - MS-DOS 7/Windows95 - GET CREATION DATE AND TIME
  7013.     AX = 5706h
  7014.     BX = file handle
  7015. Return: CF clear if successful
  7016.         CX = creation time (see #1317)
  7017.         DX = creation date (see #1318)
  7018.         SI = number of 10-millisecond units past time in CX (0-199)
  7019.     CF set on error
  7020.         AX = error code
  7021. SeeAlso: AX=5701h,AX=5704h"Windows95",AX=5707h
  7022. --------D-215707-----------------------------
  7023. INT 21 - MS-DOS 7/Windows95 - SET CREATION DATE AND TIME
  7024.     AX = 5707h
  7025.     BX = file handle
  7026.     CX = new creation time (see #1317)
  7027.     DX = new creation date (see #1318)
  7028.     SI = new creation time: 10-millisecond units past time in CX (0-199)
  7029. Return: CF clear if successful
  7030.     CF set on error
  7031.         AX = error code
  7032. SeeAlso: AX=5700h,AX=5705h,AX=5706h
  7033. --------v-215741-----------------------------
  7034. INT 21 - VIRUS - "WARP" -INSTALLATION CHECK
  7035.     AX = 5741h
  7036. Return: AX = 5250h if resident
  7037. SeeAlso: AX=5643h"VIRUS",AX=58CCh"VIRUS"
  7038. --------U-215757BX5757-----------------------
  7039. INT 21 U - IBM Genie - Resident Manager - INSTALLATION CHECK
  7040.     AX = 5757h
  7041.     BX = 5757h
  7042. Return: AX = 0000h if installed
  7043.         BX = ???
  7044.         DX = ???
  7045.         DS:SI -> list of 27 DWORD entry point addresses
  7046. Program: IBM Genie is a set of utility TSRs by Helix Software
  7047. Note:    other functions possible if BX <> 5757h, but details not yet available
  7048. ----------215758-----------------------------
  7049. INT 21 U - Headroom - API
  7050.     AX = 5758h
  7051.     BL = function
  7052.         00h ???
  7053.         01h get Headroom location
  7054.         Return: CF clear if installed
  7055.                 AX = PSP segment of Headroom TSR
  7056.                 BX = paragraphs of memory used by Headroom
  7057.             CF set if not (normal DOS return)
  7058.         Note:    this function is also used as an installation check
  7059.         02h get INT 21 handler
  7060.         Return: CF clear
  7061.             ES:BX -> Headroom's INT 21 handler
  7062.         Note: also sets unknown flag
  7063.         03h launch application???
  7064.         DS:SI -> 233-byte application record
  7065.         Return: ???
  7066.         04h ???
  7067.         ???
  7068.         Return: CF clear
  7069.         05h get swap directory
  7070.         Return: CF clear
  7071.             DX:AX -> ASCIZ swap directory name
  7072.         06h ???
  7073.         DX = ???
  7074.         Return: CF clear
  7075.         07h ???
  7076.         08h ???
  7077.         09h get current application
  7078.         Return: BX = application number
  7079.         0Ah ???
  7080.         DX = application number
  7081.         DS:SI = ???
  7082.         Return: ???
  7083.         0Bh ???
  7084.         0Ch ???
  7085.         DX = application number
  7086.         ???
  7087.         Return: ???
  7088.         0Dh ???
  7089.         DX = application number
  7090.         ???
  7091.         Return: ???
  7092.         0Eh get ???
  7093.         Return: CF clear
  7094.             AX = ???
  7095.         0Fh set ??? flag
  7096.         10h clear ??? flag
  7097.         11h find application by name
  7098.         DS:SI -> ASCIZ application name
  7099.         Return: CF clear
  7100.             AX = application number or FFFFh if not loaded
  7101.         12h ???
  7102.         DX = application number
  7103.         Return: CF clear
  7104.             ???
  7105.         13h ???
  7106.         Return: CF clear
  7107.         14h ???
  7108.         same as function 13h
  7109.         15h set ???
  7110.         DX = ???
  7111.         16h get ???
  7112.         Return: AX = ??? set by function 15h
  7113.         17h get ???
  7114.         Return: BX = ???
  7115.             CX = ??? (may be pointer in BX:CX)
  7116.         18h BUG: branches incorrectly due to fencepost error
  7117. Program: Headroom is a TSR/task switcher by Helix Software
  7118. SeeAlso: AX=4C57h,AX=5757h,INT 2F/AX=5758h
  7119. --------D-2158-------------------------------
  7120. INT 21 - DOS 2.11+ - GET OR SET MEMORY ALLOCATION STRATEGY
  7121.     AH = 58h
  7122.     AL = subfunction
  7123.         00h get allocation strategy
  7124.         Return: AX = current strategy (see #1331)
  7125.         01h set allocation strategy
  7126.         BL = new allocation strategy (see #1331)
  7127.         BH = 00h (DOS 5+)
  7128. Return: CF clear if successful
  7129.     CF set on error
  7130.         AX = error code (01h) (see #1332)
  7131. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  7132.       2 or greater means last fit
  7133.     the Get subfunction returns the last value set
  7134.     setting an allocation strategy involving high memory does not
  7135.       automatically link in the UMB memory chain; this must be done
  7136.       explicitly with AX=5803h in order to actually allocate high memory
  7137.     a program which changes the allocation strategy should restore it
  7138.       before terminating
  7139.     Toshiba MS-DOS v2.11 supports subfunctions 00h and 01h, as does the
  7140.       TI Professional MS-DOS v2.13
  7141.     DR DOS 3.41 reportedly reverses subfunctions 00h and 01h
  7142. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h"XMS",INT 67/AH=3Fh
  7143.  
  7144. (Table 1331)
  7145. Values for DOS memory allocation strategy:
  7146.  00h low memory first fit
  7147.  01h low memory best fit
  7148.  02h low memory last fit
  7149. ---DOS 5+ ---
  7150.  40h high memory first fit
  7151.  41h high memory best fit
  7152.  42h high memory last fit
  7153.  80h first fit, try high then low memory
  7154.  81h best fit, try high then low memory
  7155.  82h last fit, try high then low memory
  7156. --------D-2158-------------------------------
  7157. INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
  7158.     AH = 58h
  7159.     AL = subfunction
  7160.         02h get UMB link state
  7161.         Return: AL = current link state
  7162.                 00h UMBs not part of DOS memory chain
  7163.                 01h UMBs in DOS memory chain
  7164.         03h set UMB link state
  7165.         BX = new link state
  7166.             0000h remove UMBs from DOS memory chain
  7167.             0001h add UMBs to DOS memory chain
  7168. Return: CF clear if successful
  7169.     CF set on error
  7170.         AX = error code (01h) (see #1332)
  7171. Notes:    a program which changes the UMB link state should restore it before
  7172.       terminating
  7173.     UMBs will only be available if CONFIG.SYS contains the line DOS=UMB,
  7174.       the UMBs have been linked into the memory chain with AX=5803h, and
  7175.       the allocation strategy has been set to include high memory with
  7176.       AX=5801h
  7177. SeeAlso: #1339,#2414 at INT 2F/AX=4310h
  7178. --------v-2158CC-----------------------------
  7179. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  7180.     AX = 58CCh
  7181. Return: CF clear if resident
  7182. SeeAlso: AX=5741h"VIRUS",AX=5643h,AX=5252h,AX=58DDh,AX=6303h"VIRUS",AX=6969h
  7183. --------v-2158DD-----------------------------
  7184. INT 21 - VIRUS - "1067"/"Headcrash" - GET ORIGINAL INT 21h VECTOR
  7185.     AX = 58DDh
  7186. Return: CX = code segment of virus
  7187.     ES:BX = old INT 21h vector
  7188. SeeAlso: AX=5252h,AX=58CCh,AX=6969h
  7189. --------D-2159--BX0000-----------------------
  7190. INT 21 - DOS 3.0+ - GET EXTENDED ERROR INFORMATION
  7191.     AH = 59h
  7192.     BX = 0000h
  7193. Return: AX = extended error code (see #1332)
  7194.     BH = error class (see #1334)
  7195.     BL = recommended action (see #1335)
  7196.     CH = error locus (see #1336)
  7197.     ES:DI may be pointer (see #1333, #1332)
  7198.     CL, DX, SI, BP, and DS destroyed
  7199. Notes:    functions available under DOS 2.x map the true DOS 3.0+ error code into
  7200.       one supported under DOS 2.x
  7201.     you should call this function to retrieve the true error code when an
  7202.       FCB or DOS 2.x call returns an error
  7203.     under DR DOS 5.0, this function does not use any of the DOS-internal
  7204.       stacks and may thus be called at any time
  7205. SeeAlso: AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh
  7206.  
  7207. (Table 1332)
  7208. Values for DOS extended error code:
  7209.  00h (0)   no error
  7210.  01h (1)   function number invalid
  7211.  02h (2)   file not found
  7212.  03h (3)   path not found
  7213.  04h (4)   too many open files (no handles available)
  7214.  05h (5)   access denied
  7215.  06h (6)   invalid handle
  7216.  07h (7)   memory control block destroyed
  7217.  08h (8)   insufficient memory
  7218.  09h (9)   memory block address invalid
  7219.  0Ah (10)  environment invalid (usually >32K in length)
  7220.  0Bh (11)  format invalid
  7221.  0Ch (12)  access code invalid
  7222.  0Dh (13)  data invalid
  7223.  0Eh (14)  reserved
  7224.  0Fh (15)  invalid drive
  7225.  10h (16)  attempted to remove current directory
  7226.  11h (17)  not same device
  7227.  12h (18)  no more files
  7228. ---DOS 3.0+ ---
  7229.  13h (19)  disk write-protected
  7230.  14h (20)  unknown unit
  7231.  15h (21)  drive not ready
  7232.  16h (22)  unknown command
  7233.  17h (23)  data error (CRC)
  7234.  18h (24)  bad request structure length
  7235.  19h (25)  seek error
  7236.  1Ah (26)  unknown media type (non-DOS disk)
  7237.  1Bh (27)  sector not found
  7238.  1Ch (28)  printer out of paper
  7239.  1Dh (29)  write fault
  7240.  1Eh (30)  read fault
  7241.  1Fh (31)  general failure
  7242.  20h (32)  sharing violation
  7243.  21h (33)  lock violation
  7244.  22h (34)  disk change invalid (ES:DI -> media ID structure)(see #1333)
  7245.  23h (35)  FCB unavailable
  7246.  24h (36)  sharing buffer overflow
  7247.  25h (37)  (DOS 4.0+) code page mismatch
  7248.  26h (38)  (DOS 4.0+) cannot complete file operation (out of input)
  7249.  27h (39)  (DOS 4.0+) insufficient disk space
  7250.  28h-31h   reserved
  7251.  32h (50)  network request not supported
  7252.  33h (51)  remote computer not listening
  7253.  34h (52)  duplicate name on network
  7254.  35h (53)  network name not found
  7255.  36h (54)  network busy
  7256.  37h (55)  network device no longer exists
  7257.  38h (56)  network BIOS command limit exceeded
  7258.  39h (57)  network adapter hardware error
  7259.  3Ah (58)  incorrect response from network
  7260.  3Bh (59)  unexpected network error
  7261.  3Ch (60)  incompatible remote adapter
  7262.  3Dh (61)  print queue full
  7263.  3Eh (62)  queue not full
  7264.  3Fh (63)  not enough space to print file
  7265.  40h (64)  network name was deleted
  7266.  41h (65)  network: Access denied
  7267.  42h (66)  network device type incorrect
  7268.  43h (67)  network name not found
  7269.  44h (68)  network name limit exceeded
  7270.  45h (69)  network BIOS session limit exceeded
  7271.  46h (70)  temporarily paused
  7272.  47h (71)  network request not accepted
  7273.  48h (72)  network print/disk redirection paused
  7274.  49h (73)  network software not installed
  7275.         (LANtastic) invalid network version
  7276.  4Ah (74)  unexpected adapter close
  7277.         (LANtastic) account expired
  7278.  4Bh (75)  (LANtastic) password expired
  7279.  4Ch (76)  (LANtastic) login attempt invalid at this time
  7280.  4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
  7281.  4Eh (78)  (LANtastic v3+) not logged in to network node
  7282.  4Fh (79)  reserved
  7283.  50h (80)  file exists
  7284.  51h (81)  reserved
  7285.  52h (82)  cannot make directory
  7286.  53h (83)  fail on INT 24h
  7287.  54h (84)  (DOS 3.3+) too many redirections
  7288.  55h (85)  (DOS 3.3+) duplicate redirection
  7289.  56h (86)  (DOS 3.3+) invalid password
  7290.  57h (87)  (DOS 3.3+) invalid parameter
  7291.  58h (88)  (DOS 3.3+) network write fault
  7292.  59h (89)  (DOS 4.0+) function not supported on network
  7293.  5Ah (90)  (DOS 4.0+) required system component not installed
  7294.  5Bh (91)  (NetWare4) timer server table overflowed
  7295.  5Ch (92)  (NetWare4) duplicate in timer service table
  7296.  5Dh (93)  (NetWare4) no items to work on
  7297.  5Fh (95)  (NetWare4) invalid interrupt
  7298.  64h (100) (MSCDEX) unknown error
  7299.  64h (100) (NetWare4) open semaphore limit exceeded
  7300.  65h (101) (MSCDEX) not ready
  7301.  65h (101) (NetWare4) exclusive semaphore is already owned
  7302.  66h (102) (MSCDEX) EMS memory no longer valid
  7303.  66h (102) (NetWare4) semaphore was set when close attempted
  7304.  67h (103) (MSCDEX) not High Sierra or ISO-9660 format
  7305.  67h (103) (NetWare4) too many exclusive semaphore requests
  7306.  68h (104) (MSCDEX) door open
  7307.  68h (104) (NetWare4) operation invalid from interrupt handler
  7308.  69h (105) (NetWare4) semaphore owner died
  7309.  6Ah (106) (NetWare4) semaphore limit exceeded
  7310.  6Bh (107) (NetWare4) insert drive B: disk into drive A:
  7311.  6Ch (108) (NetWare4) drive locked by another process
  7312.  6Dh (109) (NetWare4) broken pipe
  7313.  6Eh (110) (NetWare4) pipe open/create failed
  7314.  6Fh (111) (NetWare4) pipe buffer overflowed
  7315.  70h (112) (NetWare4) disk full
  7316.  71h (113) (NetWare4) no more search handles
  7317.  72h (114) (NetWare4) invalid target handle for dup2
  7318.  73h (115) (NetWare4) bad user virtual address
  7319.  74h (116) (NetWare4) error on console I/O
  7320.  75h (117) (NetWare4) unknown category code for IOCTL
  7321.  76h (118) (NetWare4) invalid value for verify flag
  7322.  77h (119) (NetWare4) level four driver not found
  7323.  78h (120) (NetWare4) invalid function number
  7324.  79h (121) (NetWare4) semaphore timeout
  7325.  7Ah (122) (NetWare4) buffer too small
  7326.  7Bh (123) (NetWare4) invalid character or bad file-system name
  7327.  7Ch (124) (NetWare4) unimplemented information level
  7328.  7Dh (125) (NetWare4) no volume label found
  7329.  7Eh (126) (NetWare4) module handle not found
  7330.  7Fh (127) (NetWare4) procedure address not found
  7331.  80h (128) (NetWare4) CWait found no children
  7332.  81h (129) (NetWare4) CWait children still running
  7333.  82h (130) (NetWare4) invalid operation for direct disk-access handle
  7334.  83h (131) (NetWare4) attempted seek to negative offset
  7335.  84h (132) (NetWare4) attempted to seek on device or pipe
  7336.  85h (133) (NetWare4) drive already has JOINed drives
  7337.  86h (134) (NetWare4) drive is already JOINed
  7338.  87h (135) (NetWare4) drive is already SUBSTed
  7339.  88h (136) (NetWare4) can not delete drive which is not JOINed
  7340.  89h (137) (NetWare4) can not delete drive which is not SUBSTed
  7341.  8Ah (138) (NetWare4) can not JOIN to a JOINed drive
  7342.  8Bh (139) (NetWare4) can not SUBST to a SUBSTed drive
  7343.  8Ch (140) (NetWare4) can not JOIN to a SUBSTed drive
  7344.  8Dh (141) (NetWare4) can not SUBST to a JOINed drive
  7345.  8Eh (142) (NetWare4) drive is busy
  7346.  8Fh (143) (NetWare4) can not JOIN/SUBST to same drive
  7347.  90h (144) (NetWare4) directory must not be root directory
  7348.  91h (145) (NetWare4) can only JOIN to empty directory
  7349.  92h (146) (NetWare4) path is already in use for SUBST
  7350.  93h (147) (NetWare4) path is already in use for JOIN
  7351.  94h (148) (NetWare4) path is in use by another process
  7352.  95h (149) (NetWare4) directory previously SUBSTituted
  7353.  96h (150) (NetWare4) system trace error
  7354.  97h (151) (NetWare4) invalid event count for DosMuxSemWait
  7355.  98h (152) (NetWare4) too many waiting on mutex
  7356.  99h (153) (NetWare4) invalid list format
  7357.  9Ah (154) (NetWare4) volume label too large
  7358.  9Bh (155) (NetWare4) unable to create another TCB
  7359.  9Ch (156) (NetWare4) signal refused
  7360.  9Dh (157) (NetWare4) segment discarded
  7361.  9Eh (158) (NetWare4) segment not locked
  7362.  9Fh (159) (NetWare4) invalid thread-ID address
  7363.  A0h (160) (NetWare4) bad environment pointer
  7364.  A1h (161) (NetWare4) invalid name passed to EXEC
  7365.  A2h (162) (NetWare4) signal already pending
  7366.  A3h (163) (NetWare4) ERROR_124 mapping
  7367.  A4h (164) (NetWare4) no more process slots
  7368.  A5h (165) (NetWare4) ERROR_124 mapping
  7369.  B0h (176) (MS-DOS 7.0) volume is not locked
  7370.  B1h (177) (MS-DOS 7.0) volume is locked in drive
  7371.  B2h (178) (MS-DOS 7.0) volume is not removable
  7372.  B4h (180) (MS-DOS 7.0) lock count has been exceeded
  7373.  B4h (180) (NetWare4) invalid segment number
  7374.  B5h (181) (MS-DOS 7.0) a valid eject request failed
  7375.  B5h (181) (NetWare4) invalid call gate
  7376.  B6h (182) (NetWare4) invalid ordinal
  7377.  B7h (183) (NetWare4) shared segment already exists
  7378.  B8h (184) (NetWare4) no child process to wait for
  7379.  B9h (185) (NetWare4) NoWait specified and child still running
  7380.  BAh (186) (NetWare4) invalid flag number
  7381.  BBh (187) (NetWare4) semaphore does not exist
  7382.  BCh (188) (NetWare4) invalid starting code segment
  7383.  BDh (189) (NetWare4) invalid stack segment
  7384.  BEh (190) (NetWare4) invalid module type (DLL can not be used as application)
  7385.  BFh (191) (NetWare4) invalid EXE signature
  7386.  C0h (192) (NetWare4) EXE marked invalid
  7387.  C1h (193) (NetWare4) bad EXE format (e.g. DOS-mode program)
  7388.  C2h (194) (NetWare4) iterated data exceeds 64K
  7389.  C3h (195) (NetWare4) invalid minimum allocation size
  7390.  C4h (196) (NetWare4) dynamic link from invalid Ring
  7391.  C5h (197) (NetWare4) IOPL not enabled
  7392.  C6h (198) (NetWare4) invalid segment descriptor privilege level
  7393.  C7h (199) (NetWare4) automatic data segment exceeds 64K
  7394.  C8h (200) (NetWare4) Ring2 segment must be moveable
  7395.  C9h (201) (NetWare4) relocation chain exceeds segment limit
  7396.  CAh (202) (NetWare4) infinite loop in relocation chain
  7397.  CBh (203) (NetWare4) environment variable not found
  7398.  CCh (204) (NetWare4) not current country
  7399.  CDh (205) (NetWare4) no signal sent
  7400.  CEh (206) (NetWare4) file name not 8.3
  7401.  CFh (207) (NetWare4) Ring2 stack in use
  7402.  D0h (208) (NetWare4) meta expansion is too long
  7403.  D1h (209) (NetWare4) invalid signal number
  7404.  D2h (210) (NetWare4) inactive thread
  7405.  D3h (211) (NetWare4) file system information not available
  7406.  D4h (212) (NetWare4) locked error
  7407.  D5h (213) (NetWare4) attempted to execute non-family API call in DOS mode
  7408.  D6h (214) (NetWare4) too many modules
  7409.  D7h (215) (NetWare4) nesting not allowed
  7410.  E6h (230) (NetWare4) non-existent pipe, or bad operation
  7411.  E7h (231) (NetWare4) pipe is busy
  7412.  E8h (232) (NetWare4) no data available for nonblocking read
  7413.  E9h (233) (NetWare4) pipe disconnected by server
  7414.  EAh (234) (NetWare4) more data available
  7415.  FFh (255) (NetWare4) invalid drive
  7416. SeeAlso: #1334,#1335,#1336,#1614
  7417.  
  7418. Format of media ID structure:
  7419. Offset    Size    Description    (Table 1333)
  7420.  00h 12 BYTEs    ASCIZ volume label of required disk
  7421.  0Ch    DWORD    serial number (DOS 4.0+)
  7422.  
  7423. (Table 1334)
  7424. Values for DOS Error Class:
  7425.  01h    out of resource (storage space or I/O channels)
  7426.  02h    temporary situation (file or record lock)
  7427.  03h    authorization (denied access)
  7428.  04h    internal (system software bug)
  7429.  05h    hardware failure
  7430.  06h    system failure (configuration file missing or incorrect)
  7431.  07h    application program error
  7432.  08h    not found
  7433.  09h    bad format
  7434.  0Ah    locked
  7435.  0Bh    media error
  7436.  0Ch    already exists
  7437.  0Dh    unknown
  7438. SeeAlso: #1332,#1335,#1336
  7439.  
  7440. (Table 1335)
  7441. Values for DOS Suggested Action:
  7442.  01h    retry
  7443.  02h    delayed retry
  7444.  03h    prompt user to reenter input
  7445.  04h    abort after cleanup
  7446.  05h    immediate abort
  7447.  06h    ignore
  7448.  07h    retry after user intervention
  7449. SeeAlso: #1332,#1334,#1336
  7450.  
  7451. (Table 1336)
  7452. Values for DOS Error Locus:
  7453.  01h    unknown or not appropriate
  7454.  02h    block device (disk error)
  7455.  03h    network related
  7456.  04h    serial device (timeout)
  7457.  05h    memory related
  7458. SeeAlso: #1332,#1334,#1335
  7459. --------D-2159--BX0001-----------------------
  7460. INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
  7461.     AH = 59h
  7462.     BX = 0001h
  7463. Return: ES:DI -> hard error information packet (see #1337) for most recent
  7464.         hard (critical) error
  7465. SeeAlso: AH=59h/BX=0000h,AH=95h,INT 24
  7466.  
  7467. Format of European MS-DOS 4.0 hard error information packet:
  7468. Offset    Size    Description    (Table 1337)
  7469.  00h    WORD    contents of AX at system entry
  7470.  02h    WORD    Process ID which encountered error
  7471.  04h    WORD    contents of AX at time of error
  7472.  06h    BYTE    error type
  7473.         00h physical I/O error
  7474.         01h disk change request
  7475.         02h file sharing violation
  7476.         03h FCB problem
  7477.         04h file locking violation
  7478.         05h bad FAT
  7479.         06h network detected error
  7480.  07h    BYTE    INT 24 error code
  7481.  08h    WORD    extended error code (see #1332)
  7482.  0Ah    DWORD    pointer to associated device
  7483. --------D-215A-------------------------------
  7484. INT 21 - DOS 3.0+ - CREATE TEMPORARY FILE
  7485.     AH = 5Ah
  7486.     CX = file attribute (see #1073 at AX=4301h)
  7487.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  7488.         generated filename
  7489. Return: CF clear if successful
  7490.         AX = file handle opened for read/write in compatibility mode
  7491.         DS:DX pathname extended with generated name for temporary file
  7492.     CF set on error
  7493.         AX = error code (03h,04h,05h) (see #1332)
  7494. Desc:    creates a file with a unique name which must be explicitly deleted
  7495. BUGS:    COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  7496.       wraps around to the end of the segment
  7497.     MS-DOS 5.00 revisions A and B and PC-DOS 5.00 revision A reportedly
  7498.       hang the system if the specified path is the root directory and the
  7499.       root directory is full (no free directory entries)
  7500.     Mark Incley <mincley@krisalis.demon.co.uk> reports that this function
  7501.       hangs in DOS 6.2x if the name includes two consecutive path
  7502.       separators (e.g. C:\\ )
  7503. Notes:    under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  7504.     MS-DOS 3.0-4.0 and DR-DOS 3.4-5.0 generate the filename as a sequence
  7505.       of hex digits based on the current date and time; MS-DOS 6+,
  7506.       DR-DOS 6, and Novell DOS 7 use letters A-P in place of hex digits
  7507. SeeAlso: AH=3Ch,AH=5Bh
  7508. --------D-215B-------------------------------
  7509. INT 21 - DOS 3.0+ - CREATE NEW FILE
  7510.     AH = 5Bh
  7511.     CX = file attribute (see #1073 at AX=4301h)
  7512.     DS:DX -> ASCIZ filename
  7513. Return: CF clear if successful
  7514.         AX = file handle opened for read/write in compatibility mode
  7515.     CF set on error
  7516.         AX = error code (03h,04h,05h,50h) (see #1332)
  7517. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  7518.       rather than truncating it; this permits its use in creating semaphore
  7519.       files because it is an atomic "test and set" operation
  7520.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  7521. SeeAlso: AH=3Ch,AH=5Ah
  7522. --------D-215C-------------------------------
  7523. INT 21 - DOS 3.0+ - "FLOCK" - RECORD LOCKING
  7524.     AH = 5Ch
  7525.     AL = subfunction
  7526.         00h lock region of file
  7527.         01h unlock region of file
  7528.     BX = file handle
  7529.     CX:DX = start offset of region within file
  7530.     SI:DI = length of region in bytes
  7531. Return: CF clear if successful
  7532.     CF set on error
  7533.         AX = error code (01h,06h,21h,24h) (see #1332)
  7534. Notes:    error returned unless SHARE or network installed
  7535.     an unlock call must specify the same region as some prior lock call
  7536.     locked regions become entirely inaccessible to other processes
  7537.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  7538.       handles inherited by child processes (see AH=4Bh) do not
  7539.     under DR DOS 3.41 and 5.0, if a process opens a file without the no-
  7540.       inherit flag and then starts a child, any locks set by the parent
  7541.       are ignored, and the child will only get an error if it tries to
  7542.       lock an area previously locked by the parent process
  7543. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  7544. --------D-215D00-----------------------------
  7545. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  7546.     AX = 5D00h
  7547.     DS:DX -> DOS parameter list (see #1338)
  7548.     DPL contains all register values for a call to INT 21h
  7549. Return: as appropriate for function being called
  7550. Notes:    does not check AH.  Out of range values will crash the system
  7551.     executes using specified computer ID and process ID
  7552.     sharing delay loops skipped
  7553.     a special sharing mode is enabled to handle FCBs opened across network
  7554.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h) under
  7555.       MS-DOS; under DR DOS 3.41, wildcards corrupt the filesystem; and
  7556.       under DR DOS 5.0-6.0, the call returns error code 03h due to improper
  7557.       support for the server function call (refer to BUGS: section below)
  7558.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  7559.       DELETE (AH=41h), and RENAME (AH=56h)
  7560.     functions which take filenames require canonical names (as returned
  7561.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  7562. BUGS:    the OS/2 2.0 DOS Boot Session incorrectly maps DOS drive letters,
  7563.       seemingly ignoring HPFS drives
  7564.     DR DOS 5.0-6.0 merely recursively call INT 21 after loading the
  7565.       registers from the DPL, leading to problems for peer-to-peer
  7566.       networks
  7567. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  7568.  
  7569. Format of DOS parameter list:
  7570. Offset    Size    Description    (Table 1338)
  7571.  00h    WORD    AX
  7572.  02h    WORD    BX
  7573.  04h    WORD    CX
  7574.  06h    WORD    DX
  7575.  08h    WORD    SI
  7576.  0Ah    WORD    DI
  7577.  0Ch    WORD    DS
  7578.  0Eh    WORD    ES
  7579.  10h    WORD    reserved (0)
  7580.  12h    WORD    computer ID (0 = current system)
  7581.  14h    WORD    process ID (PSP segment on specified computer)
  7582. Note:    under Windows Enhanced mode, the computer ID is normally the virtual
  7583.       machine ID (see INT 2F/AX=1683h), though this can reportedly be
  7584.       changed by setting UniqueDOSPSP= in SYSTEM.INI
  7585. --------D-215D01-----------------------------
  7586. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  7587.     AX = 5D01h
  7588.     DS:DX -> DOS parameter list (see #1338), only computer ID and
  7589.           process ID fields used
  7590. Return: CF set on error
  7591.         AX = error code (see #1332)
  7592.     CF clear if successful
  7593. Notes:    flushes buffers and updates directory entries for each file which has
  7594.       been written to; if remote file, calls INT 2F/AX=1107h
  7595.     the computer ID and process ID are stored but ignored under DOS 3.3
  7596.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  7597. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  7598. --------D-215D02-----------------------------
  7599. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  7600.     AX = 5D02h
  7601.     DS:DX -> DOS parameter list (see #1338), only fields DX, DS,
  7602.           computer ID, and process ID used
  7603.     DPL's DS:DX -> ASCIZ name of file to close
  7604. Return: CF set on error
  7605.         AX = error code (see #1332)
  7606.     CF clear if successful
  7607. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h])
  7608.       (see #1288 at AH=52h)
  7609.     name must be canonical fully-qualified, such as returned by AH=60h
  7610.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  7611.     not supported by Novell DOS 7
  7612. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  7613. --------D-215D03-----------------------------
  7614. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  7615.     AX = 5D03h
  7616.     DS:DX -> DOS parameter list (see #1338), only computer ID used
  7617. Return: CF set on error
  7618.         AX = error code (see #1332)
  7619.     CF clear if successful
  7620. Notes:    error unless SHARE is loaded (calls [SysFileTable-30h])
  7621.       (see #1288 at AH=52h)
  7622.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  7623.     not supported by Novell DOS 7
  7624. SeeAlso: AX=5D02h,AX=5D04h
  7625. --------D-215D04-----------------------------
  7626. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  7627.     AX = 5D04h
  7628.     DS:DX -> DOS parameter list (see #1338), only computer ID and
  7629.           process ID fields used
  7630. Return: CF set on error
  7631.         AX = error code (see #1332)
  7632.     CF clear if successful
  7633. Notes:    error unless SHARE is loaded (calls [SysFileTable-2Ch])
  7634.        (see #1288 at AH=52h)
  7635.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  7636.     not supported by Novell DOS 7
  7637. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  7638. --------D-215D05-----------------------------
  7639. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  7640.     AX = 5D05h
  7641.     DS:DX -> DOS parameter list (see #1338)
  7642.     DPL's BX = index of sharing record (see #1289 at AH=52h)
  7643.     DPL's CX = index of SFT in sharing record's SFT list
  7644. Return: CF clear if successful
  7645.         ES:DI -> ASCIZ filename
  7646.         BX = network machine number of SFT's owner
  7647.         CX = number of locks held by SFT's owner
  7648.     CF set if either index out of range
  7649.         AX = 0012h (no more files)
  7650. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h])
  7651.       (see #1288 at AH=52h)
  7652.     names are always canonical fully-qualified, such as returned by AH=60h
  7653.     not supported by DR DOS 3.41 and 5.0 and Novell DOS 7, but does not
  7654.       return an error, instead destroying AX
  7655. SeeAlso: AH=5Ch,AH=60h
  7656. --------D-215D06-----------------------------
  7657. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  7658.     AX = 5D06h
  7659. Return: CF set on error
  7660.        AX = error code (see #1332)
  7661.     CF clear if successful
  7662.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  7663.         (critical error flag is first byte) (see #1339)
  7664.         CX = size in bytes of area which must be swapped while in DOS
  7665.         DX = size in bytes of area which must always be swapped
  7666. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  7667.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  7668.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  7669.       DOS 2.x by forcing use of correct stack
  7670.     swapping the data area allows reentering DOS unless DOS is in a
  7671.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  7672.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  7673.     SHARE and other DOS utilities consult the byte at offset 04h in the
  7674.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  7675.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  7676.     DR DOS 3.41+ supports this function, but the SDA format beyond the
  7677.       first 18h bytes is completely different from MS-DOS
  7678. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7679.  
  7680. Format of DOS 3.10-3.30 Swappable Data Area:
  7681. Offset    Size    Description    (Table 1339)
  7682.  -34    BYTE    (DOS 3.10+) printer echo flag (00h off, FFh active)
  7683.  -31    BYTE    (DOS 3.30) current switch character
  7684.  -30    BYTE    current memory allocation strategy (see AH=58h)
  7685.  -28    BYTE    (DOS 3.30) incremented on each INT 21/AX=5E01h call
  7686.  -27 16 BYTEs    (DOS 3.30) machine name set by INT 21/AX=5E01h
  7687.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  7688.           enable critical-section calls (see INT 2A/AH=80h)
  7689.  -1    BYTE    unused padding
  7690. ---start of actual SDA---
  7691.  00h    BYTE    critical error flag ("ErrorMode")
  7692.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7693.  02h    BYTE    drive on which current critical error occurred, or FFh
  7694.         (DR DOS sets to drive number during INT 24, 00h otherwise)
  7695.  03h    BYTE    locus of last error
  7696.  04h    WORD    extended error code of last error
  7697.  06h    BYTE    suggested action for last error
  7698.  07h    BYTE    class of last error
  7699.  08h    DWORD    ES:DI pointer for last error
  7700.  0Ch    DWORD    current DTA (Disk Transfer Address)
  7701.         note: may point into SDA during the DOS EXEC function
  7702.           (see AH=4Bh), so programs which swap the SDA must be
  7703.           prepared to move the DTA to a private buffer if they
  7704.           might be invoked during an EXEC
  7705.  10h    WORD    current PSP
  7706.  12h    WORD    stores SP across an INT 23
  7707.  14h    WORD    return code from last process termination (zerod after reading
  7708.           with AH=4Dh)
  7709.  16h    BYTE    current drive
  7710.  17h    BYTE    extended break flag
  7711. ---remainder need only be swapped if in DOS---
  7712.  18h    WORD    value of AX on call to INT 21
  7713.  1Ah    WORD    PSP segment for sharing/network
  7714.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  7715.  1Eh    WORD    first usable memory block found when allocating memory
  7716.  20h    WORD    best usable memory block found when allocating memory
  7717.  22h    WORD    last usable memory block found when allocating memory
  7718.  24h    WORD    memory size in paragraphs (used only during initialization)
  7719.  26h    WORD    last entry checked during directory search
  7720.  28h    BYTE    flag: INT 24 returned Fail
  7721.  29h    BYTE    flags: allowable INT 24 actions (passed to INT 24 in AH)
  7722.  2Ah    BYTE    directory flag (00h directory, 01h file)
  7723.  2Bh    BYTE    flag: FFh if Ctrl-Break termination, 00h otherwise
  7724.  2Ch    BYTE    flag: allow embedded blanks in FCB
  7725.  2Dh    BYTE    padding (unused)
  7726.  2Eh    BYTE    day of month
  7727.  2Fh    BYTE    month
  7728.  30h    WORD    year - 1980
  7729.  32h    WORD    number of days since 1-1-1980
  7730.  34h    BYTE    day of week (0 = Sunday)
  7731.  35h    BYTE    flag: console swapped during read from device
  7732.  36h    BYTE    flag: safe to call INT 28 if nonzero
  7733.  37h    BYTE    flag: if nonzero, INT 24 Abort turned into INT 24 Fail
  7734.         (set only during process termination)
  7735.  38h 26 BYTEs    device driver request header (see #2251 at INT 2F/AX=0802h)
  7736.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  7737.  56h 22 BYTEs    device driver request header for I/O calls
  7738.  6Ch 14 BYTEs    device driver request header for disk status check
  7739.  7Ah    DWORD    pointer to device I/O buffer???
  7740.  7Eh    WORD    ???
  7741.  80h    WORD    ???
  7742.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  7743.  83h    BYTE    padding (unused)
  7744.  84h  3 BYTEs    24-bit user number (see AH=30h)
  7745.  87h    BYTE    OEM number (see #1048 at AH=30h)
  7746.  88h    WORD    offset to error code conversion table for INT 25/INT 26
  7747.  8Ah  6 BYTEs    CLOCK$ transfer record (see #1340)
  7748.  90h    BYTE    device I/O buffer for single-byte I/O functions
  7749.  91h    BYTE    padding??? (unused)
  7750.  92h 128 BYTEs    buffer for filename
  7751. 112h 128 BYTEs    buffer for filename
  7752. 192h 21 BYTEs    findfirst/findnext search data block (see #1278 at AH=4Eh)
  7753. 1A7h 32 BYTEs    directory entry for found file (see #1007 at AH=11h)
  7754. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  7755. 218h 11 BYTEs    FCB-format filename for device name comparison
  7756. 223h    BYTE    terminating NUL for above filename
  7757. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7758. 22Fh    BYTE    terminating NUL for above spec
  7759. 230h    BYTE    ???
  7760. 231h    WORD    destination file/directory starting sector
  7761. 233h  5 BYTEs    ???
  7762. 238h    BYTE    extended FCB file attribute
  7763. 239h    BYTE    type of FCB (00h regular, FFh extended)
  7764. 23Ah    BYTE    directory search attributes
  7765. 23Bh    BYTE    file open/access mode
  7766. 23Ch    BYTE    file found/delete flag
  7767.         bit 0: file found
  7768.         bit 4: file deleted
  7769. 23Dh    BYTE    flag: device name found on rename, or file not found
  7770. 23Eh    BYTE    splice flag (file name and directory name together)
  7771. 23Fh    BYTE    flag indicating how DOS function was invoked
  7772.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7773. 240h    BYTE    sector position within cluster
  7774. 241h    BYTE    flag: translate sector/cluster (00h no, 01h yes)
  7775. 242h    BYTE    flag: 00h if read, 01h if write
  7776. 243h    BYTE    current working drive number
  7777. 244h    BYTE    cluster factor
  7778. 245h    BYTE    flag: cluster split mode
  7779. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  7780. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  7781. 248h    BYTE    volume ID flag
  7782. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  7783. 24Ah    BYTE    file create flag (00h = no, search only)
  7784. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  7785.           (normally E5h, but 00h as described under INT 21/AH=13h)
  7786. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  7787.         temp: used during process termination
  7788. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  7789. 254h    WORD    stores SP across INT 24
  7790. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  7791. 25Ah    WORD    saving partial cluster number
  7792. 25Ch    WORD    temp: sector of work current cluster
  7793. 25Eh    WORD    high part of cluster number (only low byte referenced)
  7794. 260h    WORD    ??? temp
  7795. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7796. 263h    BYTE    padding (unused)
  7797. 264h    DWORD    pointer to device header when filename is character device
  7798. 268h    DWORD    pointer to current SFT
  7799. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  7800. 270h    DWORD    pointer to caller's FCB
  7801. 274h    WORD    number of SFT to which file being opened will refer
  7802. 276h    WORD    temporary storage for file handle
  7803. 278h    DWORD    pointer to a JFT entry in process handle table
  7804.           (see #1032 at AH=26h)
  7805. 27Ch    WORD    offset in DOS DS of first filename argument
  7806. 27Eh    WORD    offset in DOS DS of second filename argument
  7807. 280h    WORD    offset of last component in pathname or FFFFh
  7808. 282h    WORD    offset of transfer address to add
  7809. 284h    WORD    last relative cluster within file being accessed
  7810. 286h    WORD    temp: absolute cluster number being accessed
  7811. 288h    WORD    directory sector number
  7812. 28Ah    WORD    ??? current cluster number
  7813. 28Ch    WORD    current relative sector number within file
  7814. 28Eh    WORD    current sector number
  7815. 290h    WORD    current byte offset within sector
  7816. 292h    DWORD    current offset in file
  7817. 296h    DWORD    temp: file byte count
  7818. 29Ah    WORD    temp: file byte count
  7819. 29Ch    WORD    free file cluster entry
  7820. 29Eh    WORD    last file cluster entry
  7821. 2A0h    WORD    next file cluster number
  7822. 2A2h    DWORD    number of bytes appended to file
  7823. 2A6h    DWORD    pointer to current work disk buffer
  7824. 2AAh    DWORD    pointer to working SFT
  7825. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  7826. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  7827. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  7828. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  7829.         also switched to for duration of INT 24
  7830. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7831.         (see #1278 at AH=4Eh)
  7832. 2CDh 32 BYTEs    directory entry for file being renamed (see #1007 at AH=11h)
  7833. 2EDh 331 BYTEs    critical error stack
  7834.    403h     35 BYTEs scratch SFT
  7835. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7836. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7837. ---DOS 3.2,3.3x only---
  7838. 738h    BYTE    device driver lookahead flag (usually printer)
  7839.         (see AH=64h"DOS 3.2+")
  7840. 739h    BYTE    volume change flag
  7841. 73Ah    BYTE    flag: virtual open
  7842. 73Bh    BYTE    ???
  7843. SeeAlso: #1342
  7844.  
  7845. Format of CLOCK$ transfer record:
  7846. Offset    Size    Description    (Table 1340)
  7847.  00h    WORD    number of days since 1-Jan-1980
  7848.  02h    BYTE    minutes
  7849.  03h    BYTE    hours
  7850.  04h    BYTE    hundredths of second
  7851.  05h    BYTE    seconds
  7852. --------D-215D07-----------------------------
  7853. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  7854.     AX = 5D07h
  7855. Return: DL = mode
  7856.         00h redirected output is combined
  7857.         01h redirected output in separate print jobs
  7858. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  7859. --------D-215D08-----------------------------
  7860. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  7861.     AX = 5D08h
  7862.     DL = mode
  7863.         00h redirected output is combined
  7864.         01h redirected output placed in separate jobs, start new print job
  7865.         now
  7866. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  7867. --------D-215D09-----------------------------
  7868. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  7869.     AX = 5D09h
  7870. Notes:    forces redirected printer output to be printed, and starts a new print
  7871.       job
  7872.     this function is also supported by 10Net, which calls it Terminate All
  7873.       Spool Jobs, and does not flush if in "combine" mode
  7874. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  7875. --------D-215D0A-----------------------------
  7876. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  7877.     AX = 5D0Ah
  7878.     DS:DX -> 11-word DOS parameter list (see #1338)
  7879. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  7880.       DX,DI, and ES in corresponding registers
  7881. Notes:    documented for DOS 5+, but undocumented in earlier versions
  7882.     the MS-DOS Programmer's Reference incorrectly states that this call was
  7883.       introduced in DOS 4, and fails to mention that the ERROR structure
  7884.       passed to this function is a DOS parameter list.
  7885. BUGS:    DR DOS 3.41 and 5.0 read the value for ES from the DS field of the
  7886.       DPL; fortunately, MS-DOS ignores the DS field, allowing a generic
  7887.       routine which sets both DS and ES fields to the same value
  7888.     Novell DOS 7 does not save the pointer, which is always reported as
  7889.       0000h:0000h by AH=59h
  7890. SeeAlso: AH=59h/BX=0000h
  7891. --------D-215D0B-----------------------------
  7892. INT 21 OU - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  7893.     AX = 5D0Bh
  7894. Return: CF set on error
  7895.         AX = error code (see #1332)
  7896.     CF clear if successful
  7897.         DS:SI -> swappable data area list (see #1341)
  7898. Notes:    copying and restoring the swappable data areas allows DOS to be
  7899.       reentered unless it is in a critical section delimited by calls to
  7900.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  7901.     SHARE and other DOS utilities consult the byte at offset 04h in the
  7902.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  7903.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  7904.     DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
  7905.       call for finding the SDA (see #1339)
  7906. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h
  7907.  
  7908. Format of DOS 4.x swappable data area list:
  7909. Offset    Size    Description    (Table 1341)
  7910.  00h    WORD    count of data areas
  7911.  02h  N BYTEs    "count" copies of data area record
  7912.         Offset    Size    Description
  7913.          00h    DWORD    address
  7914.          04h    WORD    length and type
  7915.                 bit 15 set if swap always, clear if swap in DOS
  7916.                 bits 14-0: length in bytes
  7917. SeeAlso: #1342
  7918.  
  7919. Format of DOS 4.0-6.0 swappable data area:
  7920. Offset    Size    Description    (Table 1342)
  7921.  -34    BYTE    printer echo flag (00h off, FFh active)
  7922.  -31    BYTE    current switch character (ignored by DOS 5+)
  7923.  -30    BYTE    current memory allocation strategy (see AH=58h)
  7924.  -28    BYTE    incremented on each INT 21/AX=5E01h call
  7925.  -27 16 BYTEs    machine name set by INT 21/AX=5E01h
  7926.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  7927.           enable critical-section calls (see INT 2A/AH=80h)
  7928.         (all offsets are 0D0Ch, but this list is still present for
  7929.           DOS 3.x compatibility)
  7930.  -1    BYTE    unused padding
  7931. ---start of actual SDA---
  7932.  00h    BYTE    critical error flag ("ErrorMode")
  7933.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7934.  02h    BYTE    drive on which current critical error occurred or FFh
  7935.  03h    BYTE    locus of last error
  7936.  04h    WORD    extended error code of last error
  7937.  06h    BYTE    suggested action for last error
  7938.  07h    BYTE    class of last error
  7939.  08h    DWORD    ES:DI pointer for last error
  7940.  0Ch    DWORD    current DTA (Disk Transfer Address)
  7941.         note: may point into SDA during the DOS EXEC function
  7942.           (see AH=4Bh), so programs which swap the SDA must be
  7943.           prepared to move the DTA to a private buffer if they
  7944.           might be invoked during an EXEC
  7945.  10h    WORD    current PSP
  7946.  12h    WORD    stores SP across an INT 23
  7947.  14h    WORD    return code from last process termination (zerod after reading
  7948.           with AH=4Dh)
  7949.  16h    BYTE    current drive
  7950.  17h    BYTE    extended break flag
  7951.  18h    BYTE    flag: code page switching
  7952.  19h    BYTE    flag: copy of previous byte in case of INT 24 Abort
  7953. ---remainder need only be swapped if in DOS---
  7954.  1Ah    WORD    value of AX on call to INT 21
  7955.  1Ch    WORD    PSP segment for sharing/network
  7956.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  7957.  20h    WORD    first usable memory block found when allocating memory
  7958.  22h    WORD    best usable memory block found when allocating memory
  7959.  24h    WORD    last usable memory block found when allocating memory
  7960.  26h    WORD    memory size in paragraphs (used only during initialization)
  7961.  28h    WORD    last entry checked during directory search
  7962.  2Ah    BYTE    flag: nonzero if INT 24 Fail
  7963.  2Bh    BYTE    flags: allowable INT 24 responses (passed to INT 24 in AH)
  7964.  2Ch    BYTE    flag: do not set directory if nonzero
  7965.  2Dh    BYTE    flag: program aborted by ^C
  7966.  2Eh    BYTE    flag: allow embedded blanks in FCB
  7967.         may also allow use of "*" wildcard in FCBs
  7968.  2Fh    BYTE    padding (unused)
  7969.  30h    BYTE    day of month
  7970.  31h    BYTE    month
  7971.  32h    WORD    year - 1980
  7972.  34h    WORD    number of days since 1-1-1980
  7973.  36h    BYTE    day of week (0 = Sunday)
  7974.  37h    BYTE    flag: console swapped during read from device
  7975.  38h    BYTE    flag: safe to call INT 28 if nonzero
  7976.  39h    BYTE    flag: abort currently in progress, turn INT 24 Abort into Fail
  7977.  3Ah 30 BYTEs    device driver request header (see #2251 at INT 2F/AX=0802h) for
  7978.           device calls
  7979.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  7980.  5Ch 22 BYTEs    device driver request header for I/O calls
  7981.  72h 14 BYTEs    device driver request header for disk status check
  7982.  80h    DWORD    pointer to device I/O buffer
  7983.  84h    WORD    ???
  7984.  86h    WORD    ??? (0)
  7985.  88h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  7986.  89h    DWORD    start offset of file region to lock/unlock
  7987.  8Dh    DWORD    length of file region to lock/unlock
  7988.  91h    BYTE    padding (unused)
  7989.  92h  3 BYTEs    24-bit user number (see AH=30h)
  7990.  95h    BYTE    OEM number (see #1048 at AH=30h)
  7991.  96h  6 BYTEs    CLOCK$ transfer record (see #1340 at AX=5D06h)
  7992.  9Ch    BYTE    device I/O buffer for single-byte I/O functions
  7993.  9Dh    BYTE    padding???
  7994.  9Eh 128 BYTEs    buffer for filename
  7995. 11Eh 128 BYTEs    buffer for filename
  7996. 19Eh 21 BYTEs    findfirst/findnext search data block (see #1278 at AH=4Eh)
  7997. 1B3h 32 BYTEs    directory entry for found file (see #1048 at AH=11h)
  7998. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  7999. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  8000. 236h    BYTE    terminating NUL for above filename
  8001. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  8002. 242h    BYTE    terminating NUL for above filespec
  8003. 243h    BYTE    ???
  8004. 244h    WORD    ???
  8005. 246h  5 BYTEs    ???
  8006. 24Bh    BYTE    extended FCB file attributes
  8007. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  8008. 24Dh    BYTE    directory search attributes
  8009. 24Eh    BYTE    file open/access mode
  8010. 24Fh    BYTE    ??? flag bits
  8011.         reportedly 00h when deleting a file under MSDOS 5.0
  8012. 250h    BYTE    flag: device name found on rename, or file not found
  8013. 251h    BYTE    splice flag??? (file name and directory name together)
  8014. 252h    BYTE    flag indicating how DOS function was invoked
  8015.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  8016. 253h    BYTE    sector position within cluster
  8017. 254h    BYTE    ??? (flag: translate sector/cluster)
  8018. 255h    BYTE    ??? (flag: 00h if read, 01h if write)
  8019. 256h    BYTE    current working drive number
  8020. 257h    BYTE    cluster factor
  8021. 258h    BYTE    ???
  8022. 259h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  8023. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  8024. 25Bh    BYTE    volume ID flag
  8025. 25Ch    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  8026. 25Dh    BYTE    ???
  8027. 25Eh    BYTE    ??? file create flag (00h = no, search only)
  8028. 25Fh    BYTE    ??? (value for deleted file's first byte)
  8029. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  8030. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  8031. 268h    WORD    stores SP across INT 24
  8032. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  8033. 26Eh    WORD    segment of disk buffer
  8034. 270h    WORD    ??? (saving partial cluster number)
  8035. 272h    WORD    ??? (temp: sector of work current cluster)
  8036. 274h    WORD    ??? (high part of cluster number)
  8037. 276h    WORD    ??? (temp)
  8038. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  8039. 279h    BYTE    ??? (doesn't seem to be referenced)
  8040. 27Ah    DWORD    pointer to device header if filename is character device
  8041. 27Eh    DWORD    pointer to current SFT
  8042. 282h    DWORD    pointer to current directory structure for drive being accessed
  8043. 286h    DWORD    pointer to caller's FCB
  8044. 28Ah    WORD    SFT index to which file being opened will refer
  8045. 28Ch    WORD    temporary storage for file handle
  8046. 28Eh    DWORD    pointer to a JFT entry in process handle table
  8047.           (see #1032 at AH=26h)
  8048. 292h    WORD    offset in DOS DS of first filename argument
  8049. 294h    WORD    offset in DOS DS of second filename argument
  8050. 296h    WORD    ??? (offset of last component in pathname or FFFFh)
  8051. 298h    WORD    offset of transfer address to add
  8052. 29Ah    WORD    last relative cluster within file being accessed
  8053. 29Ch    WORD    temp: absolute cluster number being accessed
  8054. 29Eh    WORD    directory sector number
  8055. 2A0h    WORD    ???
  8056. 2A2h    WORD    ??? directory cluster number
  8057. 2A4h    DWORD    current relative sector number within file
  8058. 2A8h    DWORD    ??? (current sector number)
  8059. 2ACh    WORD    ??? (current byte offset within sector)
  8060. 2AEh    DWORD    current offset in file
  8061. 2B2h    WORD    ???
  8062. 2B4h    WORD    bytes in partial sector
  8063. 2B6h    WORD    number of sectors
  8064. 2B8h    WORD    ??? (free file cluster entry)
  8065. 2BAh    WORD    ??? (last file cluster entry)
  8066. 2BCh    WORD    ??? (next file cluster number)
  8067. 2BEh    DWORD    number of bytes appended to file
  8068. 2C2h    DWORD    pointer to current work disk buffer
  8069. 2C6h    DWORD    pointer to working SFT
  8070. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  8071. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  8072. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  8073. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  8074.         also switched to for duration of INT 24
  8075. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  8076. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  8077.           performed, and 01h or 03h by INT 21/AX=6C00h)
  8078. 2D7h    WORD    ??? apparently unused
  8079. 2D9h    DWORD    stored ES:DI for AX=6C00h
  8080. 2DDh    WORD    extended file open action code (see #1424 at AX=6C00h)
  8081. 2DFh    WORD    extended file open attributes (see #1423 at AX=6C00h)
  8082. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  8083. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  8084. 2E7h    WORD    ??? temp DX storage or 0000h or temp data buffer size from
  8085.           disk buffer
  8086. 2E9h    WORD    ???
  8087. 2EBh    BYTE    ???
  8088. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  8089. 2EEh    WORD    ???
  8090. 2F0h    BYTE    ???
  8091. 2F1h    WORD    ??? bit flags
  8092. 2F3h    DWORD    pointer to user-supplied filename
  8093. 2F7h    DWORD    pointer to ???
  8094. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  8095. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  8096. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  8097. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  8098.         (see #1278 at AH=4Eh)
  8099. 315h 32 BYTEs    directory entry for file being renamed (see #1007 at AH=11h)
  8100. 335h 331 BYTEs    critical error stack
  8101. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  8102. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  8103. 780h    BYTE    device driver lookahead flag (usually printer)
  8104.         (see AH=64h"DOS 3.2+")
  8105. 781h    BYTE    volume change flag
  8106. 782h    BYTE    flag: virtual open
  8107. 783h    BYTE    ???
  8108. 784h    WORD    ???
  8109. 786h    WORD    ???
  8110. 788h    WORD    ???
  8111. 78Ah    WORD    ???
  8112. SeeAlso: #1339,#1341
  8113. --------D-215E00-----------------------------
  8114. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  8115.     AX = 5E00h
  8116.     DS:DX -> 16-byte buffer for ASCII machine name
  8117. Return: CF clear if successful
  8118.         CH = validity
  8119.         00h name invalid
  8120.         nonzero valid
  8121.             CL = NetBIOS number for machine name
  8122.             DS:DX buffer filled with blank-paded name
  8123.     CF set on error
  8124.         AX = error code (01h) (see #1332 at AH=59h)
  8125. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  8126. SeeAlso: AX=5E01h
  8127. --------N-215E00-----------------------------
  8128. INT 21 - 10NET v5.0 - GET MACHINE NAME
  8129.     AX = 5E00h
  8130. Return: CL = redirector's NetBIOS name number
  8131.     ES:DI -> network node ID
  8132. SeeAlso: AX=5E01h"10NET"
  8133. --------D-215E01CH00-------------------------
  8134. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  8135.     AX = 5E01h
  8136.     CH = 00h undefine name (make it invalid)
  8137.        <> 0     define name
  8138.     CL = name number
  8139.     DS:DX -> 15-character blank-padded ASCIZ name
  8140. SeeAlso: AX=5E00h
  8141. --------N-215E01-----------------------------
  8142. INT 21 - 10NET v5.0 - GET LOCAL 10NET CONFIGURATION TABLE
  8143.     AX = 5E01h
  8144.     CX = length of buffer
  8145.     DS:DX -> buffer for 10Net configuration table (see #1343)
  8146. Return: DS:DX buffer filled
  8147. SeeAlso: AX=5E00h"10NET",INT 6F/AH=02h,INT 6F/AH=03h
  8148.  
  8149. Format of 10Net Configuration Table:
  8150. Offset    Size    Description    (Table 1343)
  8151.  00h  8 BYTEs    user name
  8152.  08h 15 BYTEs    node ID
  8153.  17h  3 BYTEs    unique portion of Ethernet address
  8154.  1Ah    BYTE    Who group number
  8155.  1Bh    WORD    services mask (see #1345)
  8156.  1Dh    DWORD    serial number
  8157.  21h    BYTE    maximum concurrent users with same serial number allowed on net
  8158.  22h    BYTE    chat mask (see #1346)
  8159.  23h    BYTE    internal system bits (see #1347)
  8160.  24h  9 BYTEs    version number in format MM.mm.xxx
  8161.  2Dh    BYTE    flag: 01h if machine is a PS/2
  8162.  2Eh    BYTE    flag: 03h if 80386
  8163.  2Fh    BYTE    spool termination mode: 01h concatenate, 02h truncate
  8164.         (see AX=5D09h)
  8165.  30h    WORD    autospool timeout in clock ticks
  8166.  32h    WORD    monitor timeout in clock ticks
  8167.  34h    WORD    unused
  8168.  36h    WORD    chat timeout in clock ticks
  8169.  38h    WORD    netBIOS session timeout in half-seconds
  8170.  3Ah    WORD    datagram send timeout in seconds
  8171.  3Ch    WORD    keyboard value for initiating chat mode
  8172.  3Eh    WORD    Who timeout in clock ticks
  8173.  40h    BYTE    flag: 01h if server should process rom NetBIOS Post return
  8174.  41h    BYTE    flag: 01h if FCBs should be recycled
  8175.  42h  3 BYTEs    signature "DBG"
  8176.  45h    BYTE    last interrupt (21h or 6Fh)
  8177.  46h    BYTE    last INT 21 AH value
  8178.  47h    BYTE    last INT 6F AH value
  8179.  48h    WORD    last item posted
  8180.  4Ah    WORD    last item free-posted
  8181.  4Ch    WORD    last item handled by server
  8182.  4Eh    WORD    last redirector send NCB
  8183.  50h    WORD    last redirector receive NCB
  8184.  52h  4 BYTEs    signature "TABL"
  8185.  56h    WORD    offset of datagram buffer table header (see #1344)
  8186.  58h    WORD    offset of chat buffer table header (see #1344)
  8187.  5Ah    WORD    offset of Raw buffer table header (see #1344)
  8188.  5Ch    WORD    offset of Workstation buffer table header (see #1344)
  8189.  5Eh    WORD    offset of server receive-any table header (see #1344)
  8190.  60h    WORD    offset of Tiny buffer table header (see #1344)
  8191.  62h    WORD    offset of zero-length buffer table (NCBs) (see #1344)
  8192.  64h    WORD    offset of Rdr (Redirector Mount) table header (see #1344)
  8193.  66h    WORD    offset of Ntab (Redirector Session) table header (see #1344)
  8194.  68h    WORD    offset of FCB table header (see #1344)
  8195.  6Ah    WORD    offset of user file handle table header (see #1344)
  8196.  6Ch    WORD    offset of workstation printer RDR extension table header
  8197.  6Eh    WORD    offset of server shared device table header (see #1344)
  8198.  70h    WORD    offset of server connection table header (see #1344)
  8199.  72h    WORD    offset of server login table header (see #1344)
  8200.  74h    WORD    offset of server file table header (see #1344)
  8201.  76h    WORD    offset of server shared file table header (see #1344)
  8202.  78h    WORD    offset of server record lock table header (see #1344)
  8203.  7Ah    WORD    offset of remote printer claim table header (see #1344)
  8204.  7Ch    WORD    offset of remote printer device table header (see #1344)
  8205.  7Eh    WORD    offset of print server mount table header (see #1344)
  8206.  80h    WORD    offset of print server sessions table header (see #1344)
  8207.  82h    WORD    offset of print server print job structure table header
  8208.  84h    WORD    offset of print server pooled device table header (see #1344)
  8209.  86h    WORD    size of workstation buffer
  8210.  88h    WORD    size of server receive-any buffer
  8211.  8Ah    WORD    size of server raw I/O buffer
  8212.  8Ch  6 BYTEs    reserved
  8213.  92h    DWORD    pointer to profile pathname
  8214.  96h    BYTE    datagram retry count
  8215.  97h    BYTE    NetBIOS LAN adapter number
  8216.  98h  6 BYTEs    physical Ethernet address
  8217.  9Eh    BYTE    NetBIOS server name number
  8218.  9Fh    BYTE    NetBIOS redirector name number
  8219.  A0h    BYTE    10Net interrupt number
  8220.  A1h    BYTE    flag: chat is loaded
  8221.  A2h    BYTE    flag: INT 6F APIs permanently loaded
  8222.  A3h    BYTE    flag: file security present
  8223.  A4h    WORD    reserved
  8224.  A6h    BYTE    fixed mount bitmask for drives A:-H:
  8225.  A7h    BYTE    reserved
  8226.  A8h    WORD    10Net system flags (see #1348)
  8227.  AAh    BYTE    monitor flags (see #1349)
  8228.  ABh  5 BYTEs    reserved
  8229.  B0h    WORD    offset of monitor timer block
  8230.  B2h    WORD    offset of server timer block
  8231.  B4h    WORD    offset of chat timer block
  8232.  B6h    WORD    timer chain
  8233.  B8h  4 BYTEs    signature "TALS"
  8234.  BCh    WORD    number of 10Net sends
  8235.  BEh    WORD    number of 10Net receives
  8236.  C0h    WORD    number of no-buffer conditions
  8237.  C2h    WORD    number of dropped posted messages
  8238.  C4h    WORD    number of server NCB errors
  8239.  C6h    WORD    number of redirector NCB errors
  8240.  C8h    WORD    number of datagram send/receive errors
  8241.  CAh    WORD    number of dropped Whos
  8242.  CCh    WORD    number of dropped submits
  8243.  CEh    WORD    number of session aborts
  8244.  D0h    BYTE    number of NetBIOS interface-busy errors
  8245.  D1h    BYTE    last NetBIOS bad post command
  8246.  D2h    BYTE    last NetBIOS bad redirector command
  8247.  D3h    BYTE    do send datagram send/receive error command
  8248.  D4h    DWORD    -> DOS system parameter table
  8249.  D8h    WORD    number of DOS physical drives
  8250.  DAh    WORD    offset of DOS PSP field in DOS data segment
  8251.  DCh    WORD    offset of in-DOS flag in DOS data segment
  8252.  DEh    WORD    DOS data segment
  8253.  E0h    WORD    offset of DOS SFT in DOS data segment
  8254.  E2h    WORD    offset of number-of-physical-units field in DOS data segment
  8255.  E4h    WORD    10Net code segment
  8256.  E6h    WORD    10Net data segment
  8257.  E8h    WORD    10Net common server segment
  8258.  EAh    WORD    10Net file server segment
  8259.  ECh    WORD    10Net print server segment
  8260.  EEh    WORD    10Net remote printer segment
  8261. Note:    documentation lists field at offset D0h as a WORD, but all following
  8262.       offsets are as though it were a BYTE; if it is indeed a WORD, all
  8263.       offsets after D0h must be increased by one byte
  8264.  
  8265. Format of 10Net Table Header:
  8266. Offset    Size    Description    (Table 1344)
  8267.  -16  4 BYTEs    table identifier
  8268.  -12    WORD    peak number of tables allocated
  8269.  -10    WORD    number of tables currently in use
  8270.  -8    WORD    total number of tables
  8271.  -6    WORD    size of each table
  8272.  -4    WORD    offset of first allocated table
  8273.  -2    WORD    offset of first free table
  8274.  
  8275. Bitfields for 10NET services mask:
  8276. Bit(s)    Description    (Table 1345)
  8277.  0    workstation
  8278.  1    file server
  8279.  2    print queue server
  8280.  3    de-spool server
  8281.  
  8282. Bitfields for 10NET chat mask:
  8283. Bit(s)    Description    (Table 1346)
  8284.  0    chat permitted
  8285.  1    bell enabled
  8286.  2    chat keyboard initiated
  8287.  3    in INT 16 handler
  8288.  4    in Get Input
  8289.  5    display has timed out
  8290.  6    chat is idle
  8291.  
  8292. Bitfields for 10NET internal system bits:
  8293. Bit(s)    Description    (Table 1347)
  8294.  0    submit permitted
  8295.  1    submit initiated
  8296.  2    submit executing
  8297.  3    internal client call/chat/spool/autospool
  8298.  4    in spool termination
  8299.  5    print permitted
  8300.  6    waiting for keyboard input
  8301.  
  8302. Bitfields for 10NET System Flags:
  8303. Bit(s)    Description    (Table 1348)
  8304.  0    in NetBIOS
  8305.  1    processing INT 28
  8306.  2    is server
  8307.  3    in net user-DOS function
  8308.  4    in DOS user-DOS function
  8309.  5    in net for user non-DOS function
  8310.  6    in server DOS function
  8311.  7    in server non-DOS function
  8312.  8    in terminate
  8313.  10    in user on server request
  8314.  13    in DOS for user on server
  8315.  14    disable critical error handler
  8316.  
  8317. Bitfields for Monitor Flags:
  8318. Bit(s)    Description    (Table 1349)
  8319.  0    waiting for monitor response
  8320.  4    in monitor get-input routine
  8321.  5    monitor display timeout
  8322.  6    sensing for escape key
  8323. --------D-215E02-----------------------------
  8324. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  8325.     AX = 5E02h
  8326.     BX = redirection list index (see AX=5F02h)
  8327.     CX = length of setup string
  8328.     DS:SI -> setup string
  8329. Return: CF clear if successful
  8330.     CF set on error
  8331.         AX = error code (01h) (see #1332 at AH=59h/BX=0000h)
  8332. Note:    also supported by 10NET v5.0
  8333. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  8334. --------D-215E03-----------------------------
  8335. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  8336.     AX = 5E03h
  8337.     BX = redirection list index (see AX=5F02h)
  8338.     ES:DI -> 64-byte buffer for setup string
  8339. Return: CF clear if successful
  8340.         CX = length of setup string
  8341.         ES:DI buffer filled
  8342.     CF set on error
  8343.         AX = error code (01h) (see #1332 at AH=59h/BX=0000h)
  8344. Note:    also supported by 10NET v5.0, but 10NET is documented as using DS:SI
  8345.       instead of ES:DI
  8346. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  8347. --------D-215E04-----------------------------
  8348. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  8349.     AX = 5E04h
  8350.     BX = redirection list index (see AX=5F02h)
  8351.     DX = mode
  8352.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  8353. Return: CF set on error
  8354.         AX = error code (see #1332 at AH=59h/BX=0000h)
  8355.     CF clear if successful
  8356. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  8357. SeeAlso: AX=5E05h"DOS",INT 2F/AX=111Fh
  8358. --------N-215E04-----------------------------
  8359. INT 21 - 10NET v5.0 - INITIATE PRINT JOB
  8360.     AX = 5E04h
  8361.     BX = zero-based redirection list index (see AX=5F02h)
  8362.     DS:DX -> extended workstation printer setup structure (see #1350)
  8363. Return: CF clear if successful
  8364.     CF set on error
  8365.         AX = error code (see #1332 at AH=59h/BX=0000h)
  8366. SeeAlso: AX=5E05h"10NET",AX=5E06h"10NET"
  8367.  
  8368. Format of 10NET extended workstation printer setup structure:
  8369. Offset    Size    Description    (Table 1350)
  8370.  00h    BYTE    notification flags (see #1351)
  8371.  01h    BYTE    job control mask (see #1352)
  8372.  02h    WORD    days to retain file
  8373.  04h    WORD    test print length
  8374.  06h    BYTE    number of copies to print
  8375.  07h    BYTE    compression algorithm
  8376.  08h    BYTE    tab width (00h = don't expand)
  8377.  09h    BYTE    initiation type (00h normal, 01h non-spooled)
  8378.  0Ah 38 BYTEs    job start operation notification instructions
  8379.  30h 32 BYTEs    comment for job
  8380.  50h 64 BYTEs    output filename or non-spooled file
  8381.  
  8382. Bitfields for 10NET notification flags:
  8383. Bit(s)    Description    (Table 1351)
  8384.  0    user at print start
  8385.  1    operator at start, with reply
  8386.  2    user at print completion
  8387.  3    operator at completion, with reply
  8388.  4    user on queue switch
  8389.  5    operator on queue switch, with reply
  8390.  6    user on print error
  8391.  
  8392. Bitfields for 10NET job control mask:
  8393. Bit(s)    Description    (Table 1352)
  8394.  0    print banner page
  8395.  1    eject page at end of job
  8396.  2    mark as "held" (queue but don't print)
  8397.  3    rush job (queue at top)
  8398.  4    overwrite file with zeros before deletion
  8399.  5    hyperspool if possible
  8400. --------D-215E05-----------------------------
  8401. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  8402.     AX = 5E05h
  8403.     BX = redirection list index (see AX=5F02h)
  8404. Return: CF set on error
  8405.         AX = error code (see #1332 at AH=59h/BX=0000h)
  8406.     CF clear if successful
  8407.         DX = printer mode (see AX=5E04h)
  8408. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  8409. SeeAlso: AX=5E04h"DOS",INT 2F/AX=111Fh
  8410. --------N-215E05-----------------------------
  8411. INT 21 - 10NET v5.0 - TERMINATE PRINT JOB
  8412.     AX = 5E05h
  8413.     BX = zero-based redirection list index (see AX=5F02h)
  8414. Return: CF clear if successful
  8415.     CF set on error
  8416.         AX = error code (see #1332 at AH=59h/BX=0000h)
  8417. Note:    this call resets the spool termination mode to "truncate"
  8418.       (see AX=5D08h)
  8419. SeeAlso: AX=5E04h"10NET",AX=5E06h
  8420. --------N-215E06-----------------------------
  8421. INT 21 - 10NET v5.0 - GET/SET 10NET WORKSTATION PRINTER SETUP STRUCTURE
  8422.     AX = 5E06h
  8423.     BX = zero-based redirection list index (see AX=5F02h)
  8424.     CX = operation (06h set, 07h get)
  8425.     DS:DX -> buffer for setup structure (same as first nine bytes of
  8426.           workstation printer setup) (see #1350)
  8427. Return: CF clear if successful
  8428.         DS:DX buffer updated on get
  8429.     CF set on error
  8430.         AX = error code (see #1332 at AH=59h/BX=0000h)
  8431. SeeAlso: AX=5E04h"10NET",AX=5E05h"10NET"
  8432. --------!---Section--------------------------
  8433.